fix some bugs about signup and login.