I think I found you error...
You use session_register() BEFORE starting a session with session_start(). You cannot do that ! It's like eating Jello when it has not even been prepared and still in the box... ! You must start the session, and then, register your session variables.
Also, I don't understand this :
unset($SessionID);
session_start();
if (!isset($SessionID) && !isset($user_name))
If you unset $SessionID, it's sure that, in the if statement, !isset($SessionID) will ALWAYS return true.
I did not analyse all you codes, but I noticed a big mistake.
Example :
$HTTP_COOKIE_VARS[FNBCUser];
There are no quotes... If error_display were set to On, you would see a lot of errors running your code. Without quotes, FNBCUser is considered as a constant, but since it is not defined, I think PHP returns nothing. So, you should, no, you MUST use quotes :
$HTTP_COOKIE_VARS["FNBCUser"];
Also, if your PHP version is >= 4.1.0, I suggest you to deal this way with session :
session_start();
$_SESSION["variable_1"] = "value 1";
$_SESSION["variable_2"] = "value 2";
echo $_SESSION["variable_1"];
// ...
And an advice, NEVER use $SESSION with session_register, NEVER ! Simply use $SESSION with the variable name and the value, and it is automatically registered !