authentication and logout working