Joomla 1.6/7/ and 2.5 brings the capability for that. Ok, here is how to get this done,
- Create a new group in Users | Groups. Name it GUESTS. Select Parent Group as PUBLIC
- Goto Users | Options and selec the Component tab. Select GUEST as the "Guest User Group" there.
- Create a new ACL in Users | Acces Levels named GUEST USERS.
- Edit GUESTS USERS ACL, which you just created and select GUESTS group to it. Dont add PUBLIC group to it.
- Edit PUBLIC ACL and add GUEST USERS ACL to it.
- Now you are done with the group and access level creation. Now goto Global Configuration and select DEFAULT ACCESS LEVEL as GUEST USERS.
- Now, you are ready to go. Make any menu item or module to test. Just select , Access as GUEST USER in that item and test on frontend. You can see that menu item/module when you are not logged in. And as soon as you login, that menu item/module will be hidden.