Refactoring curl_escape_string and curl instance handle into the login class.