Change header/footer functions to be function pointers so that we
can potentially use Emulab pages within the APT interface. Still playing around with this, might not work out. Add utility function to check user login and redirect to login page. Used in pages that require a valid login. Add JS fragments to show/hide the waitwait modal.