Fixing disconnect/logout