CMS-4353 Implement login method in AuthResource.
Moved creation of principals to SecurityInitializer.