added login and logout feature