added validations to user.rb