Added saving of the sites ID (derived from applications settings in main.php)