Moving some code around

* Move all code from checkSession.partial to master.inc since that was
the only time it was needed. This made the rest of the master.inc easier
to read
* Deleted checkSession.partial
* Removed code from top of template and installed it into the
master.inc. This seems like a more logical place for the time being.