fix login failure bug