Fixed weird login bug