fix bug on login error