PLATFORM-175: moved setting/unsetting wgUser