First check if user logged in or not then add log in/log out to your header :<br /> use the following code: <br />

    if(Mage::getSingleton('customer/session')->isLoggedIn()){
       $layout->getUpdate()->addHandle('customer_logged_in');
    }else{
       $layout->getUpdate()->addHandle('customer_logged_out');
    }