Salve a tutti! Si, sono ancora io

Per integrare joomla e la blueimp ajax chat ho modificato la funzione della blueimp chat di nome
getValidLoginUserData in questo modo:
function getValidLoginUserData() {
define( '_JEXEC', 1 );
define('JPATH_BASE', ".." );
define( 'DS', DIRECTORY_SEPARATOR );
require_once (JPATH_BASE.DS.'includes'.DS.'defines.php');
require_once (JPATH_BASE.DS.'includes'.DS.'framework.php');
require('../libraries/joomla/factory.php');
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$my =& JFactory::getUser();
if ($my->id>0){
$userData=array();
$userData['userID']=$my->id;
$userData['userName']=$my->username;
$userData['userRole']='AJAX_CHAT_USER';
return $userData;
}else return NULL;
}
Questa funzione si trova in lib/class/CustomAJAXChat.php
Ho poi modificato il file di template
loggedOut.html che si trova in lib/template/loggedOut.html in questo modo:
<?xml version="1.0" encoding="[CONTENT_ENCODING/]"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="[LANG_CODE/]" lang="[LANG_CODE/]" dir="[BASE_DIRECTION/]">
<head>
<meta http-equiv="Content-Type" content="[CONTENT_TYPE/]" />
<title>[LANG]title[/LANG]</title>
<style type="text/css">
body {
padding:0;
margin:0;
}
</style>
[STYLE_SHEETS/]
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="css/ie5-6.css"/>
<![endif]-->
<script src="js/chat.js" type="text/javascript" charset="UTF-8"></script>
<script src="js/lang/[LANG_CODE/].js" type="text/javascript" charset="UTF-8"></script>
<script src="js/config.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
// <![CDATA[
function initializeLoginPage() {
document.getElementById('userNameField').focus();
if(!ajaxChat.isCookieEnabled()) {
var node = document.createElement('div');
var text = document.createTextNode(ajaxChatLang['errorCookiesRequired']);
node.appendChild(text);
document.getElementById('errorContainer').appendChild(node);
}
}
ajaxChatConfig.sessionName = '[SESSION_NAME/]';
ajaxChatConfig.cookieExpiration = parseInt('[COOKIE_EXPIRATION/]');
ajaxChatConfig.cookiePath = '[COOKIE_PATH/]';
ajaxChatConfig.cookieDomain = '[COOKIE_DOMAIN/]';
ajaxChatConfig.cookieSecure = '[COOKIE_SECURE/]';
ajaxChat.init(ajaxChatConfig, ajaxChatLang, true, true, false);
// ]]>
</script>
</head>
<body onload="initializeLoginPage();">
<div id="loginContent">
<div id="loginHeadlineContainer">
<h1>[LANG]title[/LANG]</h1>
</div>
<form id="loginForm" name='loginForm' action="./" method="post" enctype="application/x-www-form-urlencoded">
<div id="loginFormContainer">
<input type="hidden" name="login" id="loginField" value="login"/>
<input type="hidden" name="redirect" id="redirectField" value=""/>
<div><input type="submit" name="submit" id="loginButton" value="Entra"/></div>
</div>
</form>
<div id="errorContainer"><div>Assicurati di aver fatto il login prima di procedere.</div><noscript><div>Serve il JavaScript per questa Chat.</div></noscript></div>
<!--
Please retain the full copyright notice below including the link to blueimp.net.
This not only gives respect to the amount of time given freely by the developer
but also helps build interest, traffic and use of AJAX Chat.
Thanks,
Sebastian Tschan
//-->
<div id="copyright"><a href="https://blueimp.net/ajax/">AJAX Chat</a> © <a href="https://blueimp.net">blueimp.net</a></div>
</div>
</body>
</html>
Loggandosi però con joomla e cliccando sul pulsante "Entra" non succede nulla...

Qualcuno saprebbe darmi qualche dritta?
Grazie mille in anticipo
