Use an IoC Container on the server side and refactor ASP.NET Identity code to leverage the container