Index: sandbox/jabberit_messenger/trophy_expresso/js/trophyim.js
===================================================================
--- sandbox/jabberit_messenger/trophy_expresso/js/trophyim.js	(revision 2787)
+++ sandbox/jabberit_messenger/trophy_expresso/js/trophyim.js	(revision 2791)
@@ -247,5 +247,5 @@
         }	 
 
-    	if (!TrophyIM.statusConn.connected)
+    	if ( !TrophyIM.statusConn.connected )
 		{
 			TrophyIM.cookies = TrophyIM.getCookies();
@@ -253,5 +253,4 @@
 			//Load other .js scripts needed
 			document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/strophe.min.js'));
-			//document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/strophe.js'));
 			document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/json2.js')); //Keep this script last
 			
@@ -319,12 +318,14 @@
 				loadscript.rosterDiv();
 				
-				if ( loadscript.getUserCurrent() != null )
+				// Get User Current;
+				var _getUserCurrent = loadscript.getUserCurrent();
+				
+				setTimeout(function()
 				{
-					TrophyIM.login( Base64.decode(loadscript.getUserCurrent().jid), Base64.decode(loadscript.getUserCurrent().password));
-				}
-				else
-				{
-					loadscript.loginPage();
-				}
+					if ( _getUserCurrent != null )
+						TrophyIM.login( Base64.decode( _getUserCurrent.jid ), Base64.decode( _getUserCurrent.password ));
+					else
+						loadscript.loginPage();
+				}, 200);
             }
         }
@@ -384,5 +385,5 @@
     login : function()
 	{
-		if (TrophyIM.JSONStore.store_working)
+		if ( TrophyIM.JSONStore.store_working )
 		{ 
 		   //In case they never logged out
@@ -404,4 +405,5 @@
 		else
 		{
+			
 			var barejid		= document.getElementById('trophyimjid').value
 			var fulljid		= barejid + TROPHYIM_RESOURCE;
@@ -414,10 +416,8 @@
 			{
 				button.value = 'disconnect';
-				TrophyIM.connection.connect(fulljid, password, TrophyIM.onConnect);
-			}
-			else
-			{
-				button.value = 'connect';
-				TrophyIM.connection.disconnect();
+				//TrophyIM.connection.connect( fulljid , password, TrophyIM.onConnect );
+				
+				TrophyIM.login( barejid, password );
+				_winBuild('window_login_page', 'remove');
 			}
 		}
Index: sandbox/jabberit_messenger/trophy_expresso/js/jscode/loadIM.js
===================================================================
--- sandbox/jabberit_messenger/trophy_expresso/js/jscode/loadIM.js	(revision 2787)
+++ sandbox/jabberit_messenger/trophy_expresso/js/jscode/loadIM.js	(revision 2791)
@@ -448,9 +448,15 @@
 	function loginPage()
 	{
+		var paramsLoginPage = 
+		{
+			'username' : ((( Base64.decode(getUserCurrent().jid) )) ? Base64.decode(getUserCurrent().jid) : ""),
+			'password' : ((( Base64.decode(getUserCurrent().password) )) ? Base64.decode(getUserCurrent().password) : "") 
+		}
+		
 		var winLoginPage =
 		{	
 			 id_window		: "window_login_page",
 			 width			: 260,
-			 height			: 150,
+			 height			: 120,
 			 top			: 100,
 			 left			: 400,
@@ -461,5 +467,5 @@
 			 title			: "Expresso Messenger - Login",
 			 closeAction	: "remove",
-			 content		: Xtools.parse(Xtools.xml("login_page"), "loginPage.xsl")	
+			 content		: Xtools.parse(Xtools.xml("login_page"), "loginPage.xsl", paramsLoginPage)	
 		};
 
@@ -773,5 +779,5 @@
 		}
 		
-		setTimeout( function(){ _rosterDiv(); }, 500 );
+		setTimeout( function(){ _rosterDiv(); }, 550 );
 	}
 
@@ -1055,15 +1061,18 @@
 	function setUserCurrent()
 	{
-		conn.go('p.ff.data_0',
-					function(_User)
-					{
-						var _user = _User;
-						
-						conn.go('p.ff.data_1',
-								function(_pass)
-								{
-									_setUserCurrent( _user, _pass );
-								});
-					});	
+		if( getUserCurrent() == null )
+		{
+			conn.go('p.ff.data_0',
+						function(_User)
+						{
+							var _user = _User;
+							
+							conn.go('p.ff.data_1',
+									function(_pass)
+									{
+										_setUserCurrent( _user, _pass );
+									});
+						});
+		}
 	}
 
