export function loginUser ( response ) { window . localStorage . setItem ( 'TOKEN' , response . token ) ; window . localStorage . setItem ( 'LAST_LOGIN' , String ( new Date ( ) . getTime ( ) ) ) ; } export function logoutUser ( path = '/' ) { window . localStorage . removeItem ( 'TOKEN' ) ; console . log ( 'sad to see you go...' ) ; window . location . href = path ; }