build a valid URL when authorize_url has a query string.