i dont see in either of the pages that you sent where you are trying to echo the session variable.
sometimes you have to force PHP to find the session. On a page that you are trying to echo session variables, you should include the following code:
<?php @session_start(); ?>
<?php echo $_SESSION['UserGroupID']; ?>