refactoring + authentication against Azure AD