Fix middleware and context_process for navigation history

- currently only apply to carnatic
- apply exclusive name 'carnatic' to the session data