Fixed a bug in user registration.