encrypt code in the user.rb(not working)