Update app/controllers/user_controller.rb

add persistence safety code block