Test for authentication with custom headers