Replace HTTP Basic Auth with custom authentication/authorization