User Preferences Popup fix

Causes the popup only to trigger if you click cancel or close the tab with changes that are not the same as what's on the database.