logout and isAuthenticated in AuthService