Bug fix of login