add the page login check and logout