added exit dialog for exiting the app.