xrdp-ng-sesman: refactoring