Fixed #19839 -- Isolated auth tests from customized TEMPLATE_LOADERS

Thanks limscoder for the report.