Fixed logout/login bug