Refactored
Refactored logging statements
Added callbacks to repopulate the authentication sources when the cache has changed
Refactored writeAuthenticationConfigFile to use the global cached authentication config instead of a global tied hash