Added user login/logout functionality 3