too happy to solve my problem leaded my self into another problem

ok.. heres the code:
[scirpt]
<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'Board/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common2.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_POSTING);
init_userprefs($userdata);
//
// End session management
//
//
// The user is not authed, if they're not logged in then redirect
// them, else show them an error message
//
if ( !$is_auth[$is_auth_type] )
{
if ( $userdata['session_logged_in'] )
{
print ("<html>
<head>
<title>Welcome to the page.</title>
</head>
<body>
<p align='center'>Welcome to the page.</p>
<body>
</html>");
}
print ("<html>
<head>
<title>Please Login or Register!</title>
<META HTTP-EQUIV='Refresh' CONTENT='3; URL=login.php'>
</head>
<body>
<h1 align='center'>Redirecting your browser to Login page.</h1>
<p align='center'>If your browser does not refresh in 3 seconds, click <a href = login.php>here</a>.
</p>
<body>
</html>");
}
?>
[/script]
now wen the user is not logged in .. the page is showing the redirection thing.. but wen the user is logeed in.. the page is displaying BOTH!! how do i get it to display only ONE!! !!! please helpppppppp!!!!!
