Logout bugfix