Fixed Login and Logout