Made basic authentication work for synchronous requests.