In order to accommodate the requirements of the work on supporting XMPP authentication on mobile/react-native, make dealing with Dialog a little more generic and a little easier.