Refactor client generator authentication to be a little more modular.