[#1110] _get_session throws exception

Problem description
===============

`_get_session` method throws `KeyError` exception when the request contains session information but the session id is not valid.

Changes description
===============

Catch `KeyError` exceptions and return `None` when the session ID present in the request header is not valid.

Added unit tests for the method.

How to try and test the changes
========================

Check that all tests pass.

reviewers @adiroiban