Backport: fixes to progress dialog and sessions, as proposed in https://code.launchpad.net/%7Etpokorra/openpetraorg/20140211_replace_net_remoting_fixes_progressdialog