Okay, your issue here is that you don't fully understand what register globals does, and how it's changed between php4 and php5.
Each php version below php5 has had register globals turned on. What this means is that those array keys in the $POST, $GET, $SESSION, $COOKIE, $REQUEST, $HTTP*VARS each become variable names, and the values translate over to the variable values. For example, in PHP 4, this would output the same:
<?php
session_start();
$_SESSION['myName'] = 'bpat1434';
echo 'My Name Is: ' . $myName;
echo 'My Name Is: ' . $_SESSION['myName'];
Notice how the array key "myName" becomes a variable with registered globals turned on? Now, in php5, it's turned off by default, which means that everything we thought was a variable before, is no longer. So we have to explicitly use $SESSION, $POST, $GET, $REQUEST, $_COOKIE. So in PHP5, $logged_userID is an uninitialized variable. So your code asks to see if "$logged_userID" evaluates to false. Since it's uninitialized, it should return null or an empty string in which case that equates to false, and as such, your if() statement will fire.
This is going to sound like a lot of work for you, but in order ot fix it, you have to walk through all of your code, and remove any register globals dependent items. It may take you time to look through and figure out if it's truly part of a global item, or whether it's just another variable. So if you find it taking you too long, just redo it.