debug the login and logout