Here:
PHP Code:
<td class="bottom" align="left"><span class="smallfont"><? print("" .WELCOME_BACK. "")?>, <b><a href="userdetails.php?id=<?=$CURUSER['id']?>"><?=$CURUSER['username']?></a></b><?=$medaldon?><?=$warn?> [<a href="logout.php"><? print("" .LOG_OUT. "")?></a>]<br/>
replace
logout.php with:
PHP Code:
logout.php?id=<?=$CURUSER[id]?>