Refactoring to follow the SecurityServiceProvider decoupling