fix bugs of login