Add button to close window
Update button visibility