finished login and logout feature