Initial upload of /main module
Moved session checks to functions.php

created session_check() function