I dont't have the loginbox anywhere at my site (as a module), but some content are configured with accesslevel "registered"..
So when user goes to that page he gets an message "You are not authorized to view this resource."
So I changed that message in /language/english.php to this
PHP Code:
DEFINE("_NOT_AUTH","You are not authorized to view this resource. Pleace <a href='index.php?option=com_login'>login</a> or <a href='index.php?option=registration&task=register'>register</a> to the site");
AND
And made some changes to /components/com_login/ files explained here:
http://forum.mamboserver.com/showthread.php?t=9303
Now she/he clicks the link to "login" and after login he gets to page he requested!