user login check and footer print

made the check for user login on logged-in pages use a consistent
partial/include file which can be edited later with a "please log in
again" message;  and made sure that prints out the footer instead of
just exiting