Fix resend validation email api call

The call to resend-validation-email was missing the auth-header, though it was included in the params. To try to reduce the likelihood of this happening in the future, I've also done a small refactor in IdApi aimed at reducing duplication. cc @Nick-Smith