Fixed context-session-integration and added context-based principal.