Close the app after pressing the close button.