login and logout functionality completed