improve validation on User object in authexample