improve error handling in the auth_client library, and fix the SSL options: test passes with libcurl-openssl