Restrict page refreshes until after the first page has loaded