MODE-2344: Process login/logout procedure
Merge pull request #1316 from okulikov/MODE-2344

MODE-2344: Process login/logout procedure