Track the application status and disable buttons in consequence

Work in progress.