Refactor UsersController#new (controller and view)

Moved logic from the view to the controller.