refactoring auth modules to pass tests - more