Show Joomla Login Module on Restricted Pages Instead of Error Message

I'm running Joomla on my server and I want for people to have to login in when the reach a restricted page. I only want to show the login module on the restricted pages. I also don't want it to throw up the "you are not authorized" words. I'd rather put in my own instructions telling them to register and/or login.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

wonkotsaneConnect With a Mentor Commented:
Joomla really, really sucks at doing user access control.  The best option for you is to install something like JACL which will give decent control over user accounts and permissions.

You can get Joomla here:
Sorry, that should have said you can get *JACL* here.
baadayakaziAuthor Commented:
I just looked at this component and since it requires major hacking of the core Joomla files (according to the download agreement), I'd rather not take my chances.

Is there something I can do to change the way the current installation responds to users who are not logged in? Instead of showing text that says to log in, it show a module...the login one.
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Not without hacking the core Joomla files!
baadayakaziAuthor Commented:
I don't mind going in and altering a few lines of code in the core Joomla files, especially since I can easily make backups. I'm just afraid of installing a component that will alter a bunch of files automatically that I may have to go track down if/when there's a problem. It's about control ;)
I had to do this too for Joomla 1.5 - I wrote my own template and component which basically centered around these lines of code:
if ( $user->guest) {
} else {
} ?>
The contentarea is the usual content that you'd see.
All Courses

From novice to tech pro — start learning today.