#532

- putting session into context if not exists
- adding missing imports