Add authentication check on load of main and config pages