updating validation check to verify credentials