diff --git a/app/actions/actionsTypes.js b/app/actions/actionsTypes.js
index 207ace19f2b0f144a30f34e95411b1d91da480c3..5b541dcd0d7e977de3a885ea71f50132546fd1d7 100644
--- a/app/actions/actionsTypes.js
+++ b/app/actions/actionsTypes.js
@@ -11,6 +11,7 @@ function createRequestTypes(base, types = defaultTypes) {
 
 // Login events
 export const LOGIN = createRequestTypes('LOGIN');
+export const ROOMS = createRequestTypes('ROOMS');
 export const METEOR = createRequestTypes('METEOR_CONNECT');
 export const LOGOUT = 'LOGOUT'; // logout is always success
 
diff --git a/app/actions/login.js b/app/actions/login.js
index cf9bd55e1dfab49d4c5108bf2f3ff6cff580ab30..eb41082fa1b99770b80b75c22c7ecfe03f164ea2 100644
--- a/app/actions/login.js
+++ b/app/actions/login.js
@@ -7,11 +7,11 @@ export function loginRequest(credentials) {
 	};
 }
 
-export function loginSuccess({ token, user }) {
+export function loginSuccess(/* { token, user } */) {
 	return {
-		type: types.LOGIN.SUCCESS,
-		token,
-		user
+		type: types.LOGIN.SUCCESS
+		// token,
+		// user
 	};
 }
 
diff --git a/app/actions/rooms.js b/app/actions/rooms.js
new file mode 100644
index 0000000000000000000000000000000000000000..e22049e4b086ddfaca841fc90e2f8bed63fb68d9
--- /dev/null
+++ b/app/actions/rooms.js
@@ -0,0 +1,20 @@
+import * as types from './actionsTypes';
+
+export function roomsSuccessRequest() {
+	return {
+		type: types.ROOMS.REQUEST
+	};
+}
+
+export function roomsSuccess() {
+	return {
+		type: types.ROOMS.SUCCESS
+	};
+}
+
+export function roomsSuccessFailure(err) {
+	return {
+		type: types.ROOMS.FAILURE,
+		err
+	};
+}
diff --git a/app/lib/realm.js b/app/lib/realm.js
index b1219a3b3909aba27aaead0716f2106a27b9caba..5068a34b33fac95c9700011fbcea5cd75a4a5c2d 100644
--- a/app/lib/realm.js
+++ b/app/lib/realm.js
@@ -154,7 +154,7 @@ const messagesSchema = {
 	// }
 };
 
-// Realm.clearTestState();
+Realm.clearTestState();
 
 const realm = new Realm({
 	schema: [settingsSchema, serversSchema, subscriptionSchema, messagesSchema, usersSchema, attachment]
diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js
index 11959ed304a710524755879053ace63e5f638c4c..a7666ed46b33f83d9fd876ac2bbd5236a5ce6675 100644
--- a/app/lib/rocketchat.js
+++ b/app/lib/rocketchat.js
@@ -363,7 +363,37 @@ const RocketChat = {
 			});
 		}
 	},
-
+	getRooms() {
+		// Meteor.Accounts.onLogin(() => {
+		return Promise.all([call('subscriptions/get'), call('rooms/get')]).then(([subscriptions, rooms]) => {
+			subscriptions = subscriptions.sort((s1, s2) => (s1.rid > s2.rid ? 1 : -1));
+			rooms = rooms.sort((s1, s2) => (s1._id > s2._id ? 1 : -1));
+			const data = subscriptions.map((subscription, index) => {
+				subscription._updatedAt = rooms[index]._updatedAt;
+				return subscription;
+			});
+			Meteor.subscribe('stream-notify-user', `${ Meteor.userId() }/subscriptions-changed`, false);
+			// Meteor.subscribe('stream-notify-user', `${ Meteor.userId() }/rooms-changed`, false);
+			realm.write(() => {
+				data.forEach((subscription) => {
+					// const subscription = {
+					// 	_id: item._id
+					// };
+					// if (typeof item.value === 'string') {
+					// 	subscription.value = item.value;
+					// }
+					subscription._server = { id: RocketChat.currentServer };
+					// write('subscriptions', subscription);
+					realm.create('subscriptions', subscription, true);
+				});
+			});
+			return data;
+		}).then((data) => {
+			console.log('subscriptions done.');
+			return data;
+		});
+		// });
+	},
 	logout() {
 		return AsyncStorage.clear();
 	}
@@ -374,34 +404,5 @@ export default RocketChat;
 if (RocketChat.currentServer) {
 	reduxStore.dispatch(actions.setCurrentServer(RocketChat.currentServer));
 }
-
-Meteor.Accounts.onLogin(() => {
-	Promise.all([call('subscriptions/get'), call('rooms/get')]).then(([subscriptions, rooms]) => {
-		subscriptions = subscriptions.sort((s1, s2) => (s1.rid > s2.rid ? 1 : -1));
-		rooms = rooms.sort((s1, s2) => (s1._id > s2._id ? 1 : -1));
-		const data = subscriptions.map((subscription, index) => {
-			subscription._updatedAt = rooms[index]._updatedAt;
-			return subscription;
-		});
-		Meteor.subscribe('stream-notify-user', `${ Meteor.userId() }/subscriptions-changed`, false);
-		// Meteor.subscribe('stream-notify-user', `${ Meteor.userId() }/rooms-changed`, false);
-		realm.write(() => {
-			data.forEach((subscription) => {
-			// const subscription = {
-			// 	_id: item._id
-			// };
-			// if (typeof item.value === 'string') {
-			// 	subscription.value = item.value;
-			// }
-				subscription._server = { id: RocketChat.currentServer };
-				// write('subscriptions', subscription);
-				realm.create('subscriptions', subscription, true);
-			});
-		});
-	}).then(() => {
-		console.log('subscriptions done.');
-	});
-});
-
 // Use for logout
 // AsyncStorage.clear();
diff --git a/app/reducers/login.js b/app/reducers/login.js
index 471f149880fdbaf343614bb3bdf06662977f6210..5074077faf2a274b8905f0a648a22948cc780fb1 100644
--- a/app/reducers/login.js
+++ b/app/reducers/login.js
@@ -19,9 +19,9 @@ export default function login(state = initialState, action) {
 			return { ...state,
 				isFetching: false,
 				isAuthenticated: true,
-				token: action.token,
-				failure: false,
-				user: action.user
+				// token: action.token,
+				failure: false
+				// user: action.user
 			};
 		case types.LOGIN.FAILURE:
 			return { ...state,
diff --git a/app/reducers/rooms.js b/app/reducers/rooms.js
new file mode 100644
index 0000000000000000000000000000000000000000..f1e158134353ee52f3bc0b2f9919dfe926494cfd
--- /dev/null
+++ b/app/reducers/rooms.js
@@ -0,0 +1,29 @@
+import * as types from '../actions/actionsTypes';
+
+const initialState = {
+	isFetching: false,
+	failure: false
+};
+
+export default function login(state = initialState, action) {
+	switch (action.type) {
+		case types.ROOMS.REQUEST:
+			return { ...state,
+				isFetching: true
+			};
+		case types.ROOMS.SUCCESS:
+			return { ...state,
+				isFetching: false
+			};
+		case types.LOGIN.FAILURE:
+			return { ...state,
+				isFetching: false,
+				failure: true,
+				errorMessage: action.err
+			};
+		// case types.LOGOUT:
+		// 	return initialState;
+		default:
+			return state;
+	}
+}
diff --git a/app/sagas/index.js b/app/sagas/index.js
index 8bc2cf60915058b7c0a4090c801ee68f4d2faa38..c2e3aead9265c17a00137a022dbf0b349ca7278b 100644
--- a/app/sagas/index.js
+++ b/app/sagas/index.js
@@ -2,9 +2,11 @@ import { fork } from 'redux-saga/effects';
 import hello from './hello';
 import login from './login';
 import connect from './connect';
+import rooms from './rooms';
 
 const root = function* root() {
 	yield fork(hello);
+	yield fork(rooms);
 	yield fork(login);
 	yield fork(connect);
 };
diff --git a/app/sagas/login.js b/app/sagas/login.js
index 0f3c267e8c261f2cd80a9bc2681dfe54ce72fed4..aec7be89c26f30023c8736cbb34a3507505f2a88 100644
--- a/app/sagas/login.js
+++ b/app/sagas/login.js
@@ -5,7 +5,6 @@ import { loginSuccess, loginFailure } from '../actions/login';
 import RocketChat from '../lib/rocketchat';
 
 function loginCall(args) {
-	console.log(args);
 	return RocketChat.loginWithPassword(args);
 }
 
@@ -19,6 +18,7 @@ const watchLoginRequest = function* watchLoginRequest() {
 			yield put(loginSuccess(response));
 			console.log('\n\n[LOGIN SUCCESS]\n\n');
 		} catch (err) {
+			console.log('\n\n[LOGIN FAILURE]\n\n', err);
 			yield put(loginFailure(err.status));
 		}
 	}
diff --git a/app/sagas/rooms.js b/app/sagas/rooms.js
new file mode 100644
index 0000000000000000000000000000000000000000..f02a445a1f4aed3c6aac177aa1bf95486934fd31
--- /dev/null
+++ b/app/sagas/rooms.js
@@ -0,0 +1,31 @@
+import { take, put, call, fork } from 'redux-saga/effects';
+import * as types from '../actions/actionsTypes';
+import { roomsSuccess, roomsFailure } from '../actions/rooms';
+import RocketChat from '../lib/rocketchat';
+
+function getRooms(...args) {
+	// console.log('\n\n\n\n\n\naqui\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n');
+	return RocketChat.getRooms(...args);
+}
+
+const watchRoomsRequest = function* watchRoomsRequest() {
+	// console.log('\n\n\n\n\n\n\n\nWAINTING FOR LOGINsss\n\n\n\n\n\n\n\n');
+	while (true) {
+		// console.log('\n\n\n\n\n\n\n\nWAINTING FOR LOGIN\n\n\n\n\n\n\n\n');
+		yield take(types.LOGIN.SUCCESS);
+		// console.log('\n\n\n\n\n\n\n\nWAINTING FOR LOGIN NO MORE\n\n\n\n\n\n\n\n');
+		// const payload = yield take(types.ROOMS.REQUEST);
+		try {
+			yield call(getRooms);
+			yield put(roomsSuccess());
+		} catch (err) {
+			console.log(err);
+			yield put(roomsFailure(err.status));
+		}
+	}
+};
+
+const root = function* root() {
+	yield fork(watchRoomsRequest);
+};
+export default root;