Updated user controller for user registration.