Actually getClient() is called in two different functions, so it's not enough just set cookie store here.
Since the cookie store is associated with the client, it is better to set it in getClient() when the http client is created.