You can remove the customer_logged_in block in the customer.xml file, and then add / make a block in the customer.xml file as follows.
<reference name="content"> <block type="page/html_wrapper" name="my.account.wrapper" translate="label"> <label>My Account Wrapper</label> <action method="setElementClass"><value>my-account</value></action> <block type="core/template" name="logout_link" template="customer/logout_link.phtml"/> </block> </reference>
And the contents of logout_link.phtml will be something like
<?php $loggedIn = $this->helper("customer")->isLoggedIn(); if($loggedIn == 1){ echo "<a href=\"".Mage::getBaseUrl()."customer/account/logout/\" >LOGOUT</a>"; }else{ echo "<a href=\"".Mage::getBaseUrl()."customer/account/\" >LOGIN</a>"; }?>
....
source share