Added user login/logout functionality 4