bugfix login logout logic
bugfix