Implemented login and logout feature