creates a user model with password validation