Debugged login/logout