Added user login/logout functionality 6