Fix: Login and Logout not working properly