Fix the bug that even the username is null user can still login