added validation for the user