added user validations and tests