MODE-2251: Add refresh session method and improve message handling
Merge pull request #1358 from okulikov/MODE-2251

MODE-2251: Add refresh session method and improve message handling