Create a factory to manage the hydra client.