Added user login and logout functionality