If you use the User > Login > Default Login Layout (Figure 1) link in any of your Joomla menus, you've probably noticed a couple of limitations associated with it. One limitation is that the name of the link doesn't change, or rather, there is not an option to change the text for users who have successfully logged into the site.

I have seen the question: "How do I change my 'Login' menu link to read 'Logout'?" asked numerous times and in various ways in forums and on blogs. Well, despite this not being an option in the Joomla core, there is a relatively simple solution using a third party extension called MetaMod. If you don't already have MetaMod installed, you'll need to download and install it before completing the steps that follow. I'll be using a default Joomla installation for the example, though the concepts apply to any Joomla installation and you should be able to translate from one to another without much difficulty.
To start, create a link called "Login" on the "Main Menu" in a default Joomla installation. If you don't know how to do this, then tracking down a more basic Joomla tutorial on creating menu items would make things easier. Remember to publish the menu item.
When you're done, you should have something that looks like Figure 2 on the front page of your Joomla website.

Next, use the Joomla Menu Manager to make a copy of the menu that contains the 'Login' link. In my case, the name of the menu is: 'Main Menu'.
The new menu will have two fields to fill in, 'New Menu Title' and 'New Module Name' (Figure 3). Use the same text for both fields and choose something that will help you readily identify the menu/module and distinguish it for what it is. For this example, I chose 'Main Menu - Logout'.

Note: On the right side of the Copy Menu screen, you'll notice a list of menu items that will be copied along with the menu. If you do not see your 'Login' menu item, you've done something wrong.
After saving the new menu, you'll want to immediately select it in the Menu Manager to edit one of the fields that Joomla created for you. The field is called 'Unique Name'. It will contain the same text you entered for the other fields. For consistency and to stay true to the tooltip recommendation, you'll want to change it to a name without spaces. It's probably not a bad idea to keep it short and only use lower case characters too. In keeping with my example, I chose 'mainmenu-logout'.
While in the Menu Manager, select the icon in the 'Menu Item(s)' column next to 'Main Menu - Logout'. You'll want to select the 'Login' menu item to edit its details. Change the value of the Title' field to 'Logout'.
After you have made a copy of the menu containing your link, you'll need to edit a few of the settings for each menu module. In the Joomla Module Manager, click on the new module to edit its settings.
Review the following settings and change where necessary:
Details:
Menu Assignment: 'None'
Parameters:
For the original 'Main Menu' module, use the same settings. You'll probably want to change the title of this module too for consistency. I'll change my to 'Main Menu - Login'.
Here's where the magic happens. If you haven't used MetaMod before, it's one of those invaluable third party extensions that every Joomla site should have installed (no we don't know the developer and he didn't pay us to say that).
Using the Joomla Module Manager, locate the 'MetaMod' module and click on it to edit its settings. If you just installed MetaMod, there should be an instance that is unpublished. If you had it installed previously and are using it for something else, simply select 'New' in the Menu Manager to create a new instance.
Review the following settings and change where necessary:
Details:
Menu Assignment: 'All' (or on whichever particular pages you want it to appear)
After filling in the basic information, look at the Parameters > Module Parameters section on the right side of the page. If your original menu had a Module Class Suffix, you'll want to fill that in at the top. Then, about half way down the page, in the 'PHP' text box, type in the code as depicted in Figure 4, replacing my module ID numbers with those that correspond with your Joomla site.
After installing Metamod, my user menu with logout option "magically" appeared - no complaints from me :-).
I do, however, would like to change the wordings on the logout screen from "You are currently logged in to the private area of this site" and take out the image. How'd I do that? Thanks so much for your help!
I've tried this solution, but Metamod didn't recognize MM_NOT_LOGGED_IN ... maybe that has to do with me having an old version of Metamod... (currently their site is down, so I can't download a newer version).
But I got it working with this query:
if ($user->name == "") return ..;
else return ..;
Thanks for the input!
Sean.
I just wanted to mention to you and your users that there's a new support site for MetaMod: http://www.metamodpro.com/ that finally has all the support info properly organised, including a forum.
Also released is a new companion to MetaMod - MetaMod Pro. This is a plugin that solves the 2 most requested issues with MetaMod:
1 - when MetaMod Pro is installed, modules included by MetaMod no longer get wrapped inside the MetaMod module. Thus there's no extra HTML to mess with the CSS of your template. When you include modules, they just appear exactly where they should with no HTML surrounding them.
2 - when MetaMod Pro is installed, and a MetaMod does not include any other modules and produces no output itself, the MetaMod now *completely* disappears. It's not even counted by the template's countModules() function, so templates no longer reserve space for an otherwise-empty MetaMod. If you've ever had this issue, you'll understand what a big deal this is!
MetaMod Pro sells for $19US, but you can get $5 discount until Friday 11 Sept with this coupon: (enter it at checkout)
JOOMLAFARE
Thanks for your work guys,
Stephen Brandon
MetaMod author
Great tutorial.
I've translated to spanish, and I would like to ask your permission to include it in my spanish joomla website, of course with your original reference and link here. You can see it in http://mundojoomla.org/index.php?option=com_content&view=article&id=136&Itemid=222. (Note that, although more or less advanced, the website isn't yet finished, so I haven't yet released it.)