Working dialog.

The dialog brings MainActivity to the front...