basic user model with validation and password encryption