Stop re-setting the pipeline factory on every secure request, close #628, close #629