Debug typo and little bug about indentation
Profile checking at login managed by MapiSessionHandler class

So we have more control about the mapi objects destruction order