added validations

added validations to both user model and cleaned up authentication in routing