Added login check before all pages.