Implement login
Properly implement logout