Save the last viewed tab. Ask confirmation to quit the app.