added validations to user model and has_secure_password