Try thisFirst check if user logged in or not then add log in/log out to your header :
use the following code:
if(Mage::getSingleton('customer/session')->isLoggedIn()){
$layout->getUpdate()->addHandle('customer_logged_in');
}else{
$layout->getUpdate()->addHandle('customer_logged_out');
}