Fix Authorization code to handle proxies and key/trust stores (untested for now)