added user model validation
added user registration