Debug version. Not login out
Move the logout method internals