Fix issue where page wouldnt load if session expired