Added code to application,rb and User.rb model to fix protected attributes error.