Login/logout fixed