check for authenticated in header and footer