Fixed login bug