Handle auth_token and endpoint_url if passed to the http client constructor

Fixes bug 1152427

Change-Id: Ic7811d928fd00cde0a72f451b5ede8351092a54c
Merge "Handle auth_token and endpoint_url if passed to the http client constructor"