fix a bug about login error