MODE-2251 Merge conflicts

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