Added support for user registration.