Refactor User validation.
Merge pull request #13 from sergii-tkachenko/refactor-user-validation

Refactor User validation.