changes to users_controller.rb and user.rb