integrated exitApp and saveAndDeAuthorize methods to main class.