Fix tests & add User validations

Added validation for User model attributes. Moved user authentication to helper methods and expanded User factory to reflect new validations.