Fix a minor bug in login/reg