http-client changes for client service authentication

Not done yet, creating a pull request to get an initial review.