Refactoring auth w/ config