Fix for login bug