import { auth } from '../../../services/api';
import { LOGIN_LOGOUT } from '../constants/action-types';
import { createAction } from '../../../utilities';

export const request = createAction(LOGIN_LOGOUT);

export default function () {
    return dispatch => {
        dispatch(request());

        return auth.login();
    };
}

@@ -1,50 +1,4 @@
-import %7B auth %7D from '../../../services/api';%0A
 impo
@@ -106,28 +106,98 @@
 s';%0A
-%0Aexport const reques
+import config from '../../../config';%0Aimport history from '../../../history';%0A%0Aconst logou
 t = 
@@ -279,16 +279,78 @@
 ch =%3E %7B%0A
+        localStorage.removeItem(config.localStorageTokenKey);%0A
         
@@ -362,29 +362,27 @@
 tch(
-reques
+logou
 t());%0A
-%0A
         
 retu
@@ -381,26 +381,29 @@
     
-return auth.
+history.push('/
 login
-(
+'
 );%0A 

add logout action