Refactor iam module.
Make authenticatedUserProvider method more explicit.