Fixed bad login bug