setup validation and authentication