refactor loading helper/login/etc files to a new function.