login and logout working properly