import { FETCH_LOGIN, RECEIVE_LOGIN, REQUEST_LOGOUT, RECEIVE_LOGOUT } from '../constants/session';

export default (state = {
  isFetching: false,
  isLogin: false
}, action) => {
  switch(action.type) {
  case FETCH_LOGIN:
    return Object.assign({}, state, {isFetching: true});
  case RECEIVE_LOGIN:
    return Object.assign({}, state, {isFetching: false, isLogin: action.isLogin});
  case REQUEST_LOGOUT:
    return Object.assign({}, state, {isFetching: true});
  case RECEIVE_LOGOUT:
    return Object.assign({}, state, {isFetching: false, isLogin: action.ok});
  default:
    return state;
  }
};

@@ -9,24 +9,31 @@
  FETCH_LOGIN
+_STATUS
 , RECEIVE_LO
@@ -39,33 +39,76 @@
 OGIN
-, REQUEST_LOGOUT, RECEIVE
+_STATUS, FAILED_LOGIN_STATUS, REQUEST_LOGOUT, SUCCESS_LOGOUT, FAILED
 _LOG
@@ -261,24 +261,31 @@
  FETCH_LOGIN
+_STATUS
 :%0A    return
@@ -351,16 +351,23 @@
 VE_LOGIN
+_STATUS
 :%0A    re
@@ -439,24 +439,110 @@
 .isLogin%7D);%0A
+  case FAILED_LOGIN_STATUS:%0A    return Object.assign(%7B%7D, state, %7BisFetching: false%7D);%0A
   case REQUE
@@ -612,31 +612,31 @@
 e%7D);%0A  case 
-RECEIVE
+SUCCESS
 _LOGOUT:%0A   
@@ -710,16 +710,96 @@
 n.ok%7D);%0A
+  case FAILED_LOGOUT:%0A    return Object.assign(%7B%7D, state, %7BisFetching: false%7D);%0A
   defaul

Fix constant names