Combine functions to make auth headers.

Tests and normal code now share the same "make_auth_header" function.