Index: protocols/jabber/io.c
===================================================================
--- protocols/jabber/io.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/jabber/io.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -118,5 +118,5 @@
 		
 		imc_error( ic, "Short write() to server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return FALSE;
 	}
@@ -161,5 +161,5 @@
 		{
 			imc_error( ic, "XML stream error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return FALSE;
 		}
@@ -205,5 +205,5 @@
 						imc_error( ic, "TLS is turned on for this "
 						          "account, but is not supported by this server" );
-						imc_logout( ic );
+						imc_logout( ic, FALSE );
 						return FALSE;
 					}
@@ -217,5 +217,5 @@
 			{
 				imc_error( ic, "XML stream error" );
-				imc_logout( ic );
+				imc_logout( ic, TRUE );
 				return FALSE;
 			}
@@ -228,5 +228,5 @@
 		
 		imc_error( ic, "Error while reading from server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return FALSE;
 	}
@@ -243,5 +243,5 @@
 	{
 		imc_error( ic, "Could not connect to server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return FALSE;
 	}
@@ -264,5 +264,5 @@
 		
 		imc_error( ic, "Could not connect to server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return FALSE;
 	}
@@ -275,5 +275,5 @@
 static xt_status jabber_end_of_stream( struct xt_node *node, gpointer data )
 {
-	imc_logout( data );
+	imc_logout( data, TRUE );
 	return XT_ABORT;
 }
@@ -298,5 +298,5 @@
 		{
 			imc_error( ic, "Server requires TLS connections, but TLS is turned off for this account" );
-			imc_logout( ic );
+			imc_logout( ic, FALSE );
 			
 			return XT_ABORT;
@@ -328,5 +328,5 @@
 		{
 			imc_error( ic, "TLS is turned on for this account, but is not supported by this server" );
-			imc_logout( ic );
+			imc_logout( ic, FALSE );
 			
 			return XT_ABORT;
@@ -429,4 +429,5 @@
 	struct xt_node *c;
 	char *s, *type = NULL, *text = NULL;
+	int allow_reconnect = TRUE;
 	
 	for( c = node->children; c; c = c->next )
@@ -453,5 +454,5 @@
 	{
 		imc_error( ic, "Unknown stream error reported by server" );
-		imc_logout( ic );
+		imc_logout( ic, allow_reconnect );
 		return XT_ABORT;
 	}
@@ -463,5 +464,5 @@
 	{
 		imc_error( ic, "Account and resource used from a different location" );
-		ic->wants_to_die = TRUE;
+		allow_reconnect = FALSE;
 	}
 	else
@@ -470,5 +471,5 @@
 	}
 	
-	imc_logout( ic );
+	imc_logout( ic, allow_reconnect );
 	
 	return XT_ABORT;
Index: protocols/jabber/iq.c
===================================================================
--- protocols/jabber/iq.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/jabber/iq.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -40,5 +40,5 @@
 	{
 		imc_error( ic, "Received IQ packet without type." );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return XT_ABORT;
 	}
@@ -220,5 +220,5 @@
 	{
 		imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return XT_HANDLED;
 	}
@@ -259,5 +259,5 @@
 		
 		imc_error( ic, "Can't find suitable authentication method" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return XT_ABORT;
 	}
@@ -278,5 +278,5 @@
 	{
 		imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return XT_HANDLED;
 	}
@@ -285,5 +285,5 @@
 	{
 		imc_error( ic, "Authentication failure" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return XT_ABORT;
 	}
Index: protocols/jabber/jabber.c
===================================================================
--- protocols/jabber/jabber.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/jabber/jabber.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -73,5 +73,5 @@
 	{
 		imc_error( ic, "Incomplete account name (format it like <username@jabberserver.name>)" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return;
 	}
@@ -166,5 +166,5 @@
 		imc_log( ic, "Incorrect port number, must be in the %d-%d range",
 		               JABBER_PORT_MIN, JABBER_PORT_MAX );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return;
 	}
@@ -187,5 +187,5 @@
 	{
 		imc_error( ic, "Could not connect to server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 	}
 }
Index: protocols/jabber/sasl.c
===================================================================
--- protocols/jabber/sasl.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/jabber/sasl.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -45,5 +45,6 @@
 	if( !s || strcmp( s, XMLNS_SASL ) != 0 )
 	{
-		imc_logout( ic );
+		imc_log( ic, "Stream error while authenticating" );
+		imc_logout( ic, FALSE );
 		return XT_ABORT;
 	}
@@ -63,5 +64,5 @@
 	{
 		imc_error( ic, "No known SASL authentication schemes supported" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return XT_ABORT;
 	}
@@ -280,5 +281,5 @@
 error:
 	imc_error( ic, "Incorrect SASL challenge received" );
-	imc_logout( ic );
+	imc_logout( ic, FALSE );
 
 silent_error:
@@ -303,5 +304,6 @@
 	if( !s || strcmp( s, XMLNS_SASL ) != 0 )
 	{
-		imc_logout( ic );
+		imc_log( ic, "Stream error while authenticating" );
+		imc_logout( ic, FALSE );
 		return XT_ABORT;
 	}
@@ -315,5 +317,5 @@
 	{
 		imc_error( ic, "Authentication failure" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return XT_ABORT;
 	}
Index: protocols/msn/msn.c
===================================================================
--- protocols/msn/msn.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/msn/msn.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -48,5 +48,5 @@
 	{
 		imc_error( ic, "Invalid account name" );
-		imc_logout( ic );
+		imc_logout( ic, FALSE );
 		return;
 	}
@@ -58,5 +58,5 @@
 	{
 		imc_error( ic, "Could not connect to server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return;
 	}
@@ -379,5 +379,5 @@
 	fn = msn_http_encode( value );
 	
-	g_snprintf( buf, sizeof( buf ), "REA %d %s %s\r\n", ++md->trId, ic->username, fn );
+	g_snprintf( buf, sizeof( buf ), "REA %d %s %s\r\n", ++md->trId, ic->acc->user, fn );
 	msn_write( ic, buf, strlen( buf ) );
 	g_free( fn );
Index: protocols/msn/msn_util.c
===================================================================
--- protocols/msn/msn_util.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/msn/msn_util.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -37,5 +37,5 @@
 	{
 		imc_error( ic, "Short write() to main server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return( 0 );
 	}
Index: protocols/msn/ns.c
===================================================================
--- protocols/msn/ns.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/msn/ns.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -48,5 +48,5 @@
 	{
 		imc_error( ic, "Could not connect to server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return FALSE;
 	}
@@ -90,5 +90,5 @@
 	{
 		imc_error( ic, "Error while reading from server" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		
 		return FALSE;
@@ -115,10 +115,10 @@
 		{
 			imc_error( ic, "Unsupported protocol" );
-			imc_logout( ic );
+			imc_logout( ic, FALSE );
 			return( 0 );
 		}
 		
 		g_snprintf( buf, sizeof( buf ), "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s\r\n",
-		                                ++md->trId, ic->username );
+		                                ++md->trId, ic->acc->user );
 		return( msn_write( ic, buf, strlen( buf ) ) );
 	}
@@ -126,5 +126,5 @@
 	{
 		/* We don't give a damn about the information we just received */
-		g_snprintf( buf, sizeof( buf ), "USR %d TWN I %s\r\n", ++md->trId, ic->username );
+		g_snprintf( buf, sizeof( buf ), "USR %d TWN I %s\r\n", ++md->trId, ic->acc->user );
 		return( msn_write( ic, buf, strlen( buf ) ) );
 	}
@@ -144,5 +144,5 @@
 			{
 				imc_error( ic, "Syntax error" );
-				imc_logout( ic );
+				imc_logout( ic, TRUE );
 				return( 0 );
 			}
@@ -163,5 +163,5 @@
 			{
 				imc_error( ic, "Syntax error" );
-				imc_logout( ic );
+				imc_logout( ic, TRUE );
 				return( 0 );
 			}
@@ -173,5 +173,5 @@
 			{
 				imc_error( ic, "Unknown authentication method for switchboard" );
-				imc_logout( ic );
+				imc_logout( ic, TRUE );
 				return( 0 );
 			}
@@ -205,5 +205,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -214,8 +214,8 @@
 		{
 			/* Time for some Passport black magic... */
-			if( !passport_get_id( msn_auth_got_passport_id, ic, ic->username, ic->password, cmd[4] ) )
+			if( !passport_get_id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) )
 			{
 				imc_error( ic, "Error while contacting Passport server" );
-				imc_logout( ic );
+				imc_logout( ic, TRUE );
 				return( 0 );
 			}
@@ -244,5 +244,5 @@
 		{
 			imc_error( ic, "Unknown authentication type" );
-			imc_logout( ic );
+			imc_logout( ic, FALSE );
 			return( 0 );
 		}
@@ -253,5 +253,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -262,5 +262,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -293,5 +293,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -345,5 +345,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -364,5 +364,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -386,5 +386,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -414,5 +414,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -439,5 +439,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -449,5 +449,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -459,5 +459,5 @@
 		{
 			imc_error( ic, "Unknown authentication method for switchboard" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -479,5 +479,5 @@
 			{
 				imc_error( ic, "Syntax error" );
-				imc_logout( ic );
+				imc_logout( ic, TRUE );
 				return( 0 );
 			}
@@ -497,8 +497,10 @@
 	else if( strcmp( cmd[0], "OUT" ) == 0 )
 	{
+		int allow_reconnect = TRUE;
+		
 		if( cmd[1] && strcmp( cmd[1], "OTH" ) == 0 )
 		{
 			imc_error( ic, "Someone else logged in with your account" );
-			ic->wants_to_die = 1;
+			allow_reconnect = FALSE;
 		}
 		else if( cmd[1] && strcmp( cmd[1], "SSD" ) == 0 )
@@ -511,5 +513,5 @@
 		}
 		
-		imc_logout( ic );
+		imc_logout( ic, allow_reconnect );
 		return( 0 );
 	}
@@ -519,9 +521,9 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
-			return( 0 );
-		}
-		
-		if( g_strcasecmp( cmd[3], ic->username ) == 0 )
+			imc_logout( ic, TRUE );
+			return( 0 );
+		}
+		
+		if( g_strcasecmp( cmd[3], ic->acc->user ) == 0 )
 		{
 			set_t *s;
@@ -553,5 +555,5 @@
 		{
 			imc_error( ic, "Syntax error" );
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -566,5 +568,5 @@
 		if( err->flags & STATUS_FATAL )
 		{
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return( 0 );
 		}
@@ -673,5 +675,5 @@
 		imc_error( ic, "Error during Passport authentication (%s)",
 		               rep->error_string ? rep->error_string : "Unknown error" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 	}
 	else
Index: protocols/msn/sb.c
===================================================================
--- protocols/msn/sb.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/msn/sb.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -142,7 +142,7 @@
 		else
 		{
-			i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->ic->username );
+			i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->ic->acc->user );
 			buf = g_new0( char, i );
-			i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic->username );
+			i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic->acc->user );
 		}
 		
@@ -188,5 +188,5 @@
 	/* Populate the channel. */
 	if( sb->who ) add_chat_buddy( sb->chat, sb->who );
-	add_chat_buddy( sb->chat, ic->username );
+	add_chat_buddy( sb->chat, ic->acc->user );
 	
 	/* And make sure the switchboard doesn't look like a regular chat anymore. */
@@ -280,7 +280,7 @@
 	
 	if( sb->session == MSN_SB_NEW )
-		g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic->username, sb->key );
+		g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic->acc->user, sb->key );
 	else
-		g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic->username, sb->key, sb->session );
+		g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic->acc->user, sb->key, sb->session );
 	
 	if( msn_sb_write( sb, buf, strlen( buf ) ) )
@@ -322,5 +322,5 @@
 	{
 		imc_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" );
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 		return( 0 );
 	}
@@ -384,5 +384,5 @@
 			if( num == tot )
 			{
-				add_chat_buddy( sb->chat, ic->username );
+				add_chat_buddy( sb->chat, ic->acc->user );
 			}
 		}
@@ -537,5 +537,5 @@
 		else if( err->flags & STATUS_FATAL )
 		{
-			imc_logout( ic );
+			imc_logout( ic, TRUE );
 			return 0;
 		}
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/nogaim.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -151,8 +151,4 @@
 	ic = g_new0( struct im_connection, 1 );
 	
-	/* Maybe we should get rid of this memory waste later. ;-) */
-	g_snprintf( ic->username, sizeof( ic->username ), "%s", acc->user );
-	g_snprintf( ic->password, sizeof( ic->password ), "%s", acc->pass );
-	
 	ic->irc = acc->irc;
 	ic->acc = acc;
@@ -201,5 +197,5 @@
 	/* If we found one, include the screenname in the message. */
 	if( a )
-		irc_usermsg( ic->irc, "%s(%s) - %s", ic->acc->prpl->name, ic->username, text );
+		irc_usermsg( ic->irc, "%s(%s) - %s", ic->acc->prpl->name, ic->acc->user, text );
 	else
 		irc_usermsg( ic->irc, "%s - %s", ic->acc->prpl->name, text );
@@ -291,5 +287,5 @@
 }
 
-void imc_logout( struct im_connection *ic )
+void imc_logout( struct im_connection *ic, int allow_reconnect )
 {
 	irc_t *irc = ic->irc;
@@ -333,5 +329,5 @@
 		/* Uhm... This is very sick. */
 	}
-	else if( !ic->wants_to_die && set_getbool( &irc->set, "auto_reconnect" ) &&
+	else if( allow_reconnect && set_getbool( &irc->set, "auto_reconnect" ) &&
 	         set_getbool( &a->set, "auto_reconnect" ) )
 	{
@@ -436,9 +432,4 @@
 	
 	return( b );
-}
-
-void signoff_blocked( struct im_connection *ic )
-{
-	return; /* Make all blocked users look invisible (TODO?) */
 }
 
@@ -730,5 +721,5 @@
 	
 	/* Gaim sends own messages through this too. IRC doesn't want this, so kill them */
-	if( g_strcasecmp( who, ic->username ) == 0 )
+	if( g_strcasecmp( who, ic->acc->user ) == 0 )
 		return;
 	
@@ -781,5 +772,5 @@
 	
 	/* It might be yourself! */
-	if( b->ic->acc->prpl->handle_cmp( handle, b->ic->username ) == 0 )
+	if( b->ic->acc->prpl->handle_cmp( handle, b->ic->acc->user ) == 0 )
 	{
 		u = user_find( b->ic->irc, b->ic->irc->nick );
@@ -815,5 +806,5 @@
 	
 	/* It might be yourself! */
-	if( g_strcasecmp( handle, b->ic->username ) == 0 )
+	if( g_strcasecmp( handle, b->ic->acc->user ) == 0 )
 	{
 		u = user_find( b->ic->irc, b->ic->irc->nick );
@@ -958,5 +949,4 @@
 {
 	char *buf = NULL;
-	int st;
 	
 	if( ( c->ic->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/nogaim.h	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -80,12 +80,8 @@
 	int permdeny;
 	
-	char username[64];
 	char displayname[128];
-	char password[32];
-	
 	char *away;
 	
 	int evil;
-	gboolean wants_to_die; /* defaults to FALSE */
 	
 	/* BitlBee */
@@ -211,5 +207,5 @@
 G_MODULE_EXPORT void imc_error( struct im_connection *ic, char *format, ... );
 G_MODULE_EXPORT void imc_connected( struct im_connection *ic );
-G_MODULE_EXPORT void imc_logout( struct im_connection *ic );
+G_MODULE_EXPORT void imc_logout( struct im_connection *ic, int allow_reconnect );
 
 /* dialogs.c */
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/oscar/oscar.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -263,10 +263,10 @@
 			aim_rxdispatch(odata->sess);
                                if (odata->killme)
-                                       imc_logout(ic);
+                                       imc_logout(ic, TRUE);
 		} else {
 			if ((conn->type == AIM_CONN_TYPE_BOS) ||
 				   !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) {
 				imc_error(ic, _("Disconnected."));
-				imc_logout(ic);
+				imc_logout(ic, TRUE);
 			} else if (conn->type == AIM_CONN_TYPE_CHAT) {
 				struct chat_connection *c = find_oscar_chat_by_conn(ic, conn);
@@ -326,5 +326,5 @@
 	if (source < 0) {
 		imc_error(ic, _("Couldn't connect to host"));
-		imc_logout(ic);
+		imc_logout(ic, TRUE);
 		return FALSE;
 	}
@@ -361,5 +361,7 @@
 		   We don't do those anymore, but let's stick with it, just in case
 		   it accidentally fixes something else too... </bitlbee> */
-		ic->password[8] = 0;
+		/* ic->acc->pass[8] = 0;
+		   Not touching this anymore now that it belongs to account_t!
+		   Let's hope nothing will break. ;-) */
 	} else {
 		ic->flags |= OPT_CONN_HTML;
@@ -379,5 +381,5 @@
 	if (conn == NULL) {
 		imc_error(ic, _("Unable to login to AIM"));
-		imc_logout(ic);
+		imc_logout(ic, TRUE);
 		return;
 	}
@@ -385,5 +387,5 @@
 	if (acc->server == NULL) {
 		imc_error(ic, "No servername specified");
-		imc_logout(ic);
+		imc_logout(ic, FALSE);
 		return;
 	}
@@ -394,5 +396,5 @@
 	}
 	
-	imc_log(ic, _("Signon: %s"), ic->username);
+	imc_log(ic, _("Signon: %s"), ic->acc->user);
 
 	aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0);
@@ -403,8 +405,8 @@
 	if (conn->fd < 0) {
 		imc_error(ic, _("Couldn't connect to host"));
-		imc_logout(ic);
+		imc_logout(ic, TRUE);
 		return;
 	}
-	aim_request_login(sess, conn, ic->username);
+	aim_request_login(sess, conn, ic->acc->user);
 }
 
@@ -463,5 +465,5 @@
 	if (source < 0) {
 		imc_error(ic, _("Could Not Connect"));
-		imc_logout(ic);
+		imc_logout(ic, TRUE);
 		return FALSE;
 	}
@@ -728,5 +730,5 @@
 	va_end(ap);
 
-	aim_send_login(sess, fr->conn, ic->username, ic->password, &info, key);
+	aim_send_login(sess, fr->conn, ic->acc->user, ic->acc->pass, &info, key);
 
 	return 1;
@@ -1013,5 +1015,5 @@
 		signon = time(NULL) - info->sessionlen;
 
-	tmp = g_strdup(normalize(ic->username));
+	tmp = g_strdup(normalize(ic->acc->user));
 	if (!strcmp(tmp, normalize(info->sn)))
 		g_snprintf(ic->displayname, sizeof(ic->displayname), "%s", info->sn);
@@ -2136,8 +2138,8 @@
 		switch(ic->permdeny) {
 		case 1:
-			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic->username);
+			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic->acc->user);
 			break;
 		case 2:
-			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic->username);
+			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic->acc->user);
 			break;
 		case 3:
@@ -2162,5 +2164,4 @@
 			break;
 		}
-		signoff_blocked(ic);
 	} else {
 		if (od->sess->ssi.received_data)
@@ -2584,5 +2585,5 @@
 	char * chatname;
 	
-	chatname = g_strdup_printf("%s%d", ic->username, chat_id++);
+	chatname = g_strdup_printf("%s%d", ic->acc->user, chat_id++);
   
 	ret = oscar_chat_join(ic, chatname);
Index: protocols/yahoo/yahoo.c
===================================================================
--- protocols/yahoo/yahoo.c	(revision cd4723c257f9f7bd8d4a46c6562f93c2aefc3dbb)
+++ protocols/yahoo/yahoo.c	(revision c2fb38096ea4e75a680e57e103d4a4986aa84c75)
@@ -361,9 +361,8 @@
 	YList *members;
 	
-	roomname = g_new0( char, strlen( ic->username ) + 16 );
-	g_snprintf( roomname, strlen( ic->username ) + 16, "%s-Bee-%d", ic->username, byahoo_chat_id );
+	roomname = g_strdup_printf( "%s-Bee-%d", ic->acc->user, byahoo_chat_id );
 	
 	c = serv_got_joined_chat( ic, roomname );
-	add_chat_buddy( c, ic->username );
+	add_chat_buddy( c, ic->acc->user );
 	
 	/* FIXME: Free this thing when the chat's destroyed. We can't *always*
@@ -518,4 +517,5 @@
 	{
 		char *errstr;
+		int allow_reconnect = TRUE;
 		
 		yd->logged_in = FALSE;
@@ -530,5 +530,5 @@
 		{
 			errstr = "Logged in on a different machine or device";
-			ic->wants_to_die = TRUE;
+			allow_reconnect = FALSE;
 		}
 		else if( succ == YAHOO_LOGIN_SOCK )
@@ -542,5 +542,5 @@
 			imc_error( ic, "Error %d (%s)", succ, errstr );
 		
-		imc_logout( ic );
+		imc_logout( ic, allow_reconnect );
 	}
 }
@@ -642,5 +642,5 @@
 	
 	if( fatal )
-		imc_logout( ic );
+		imc_logout( ic, TRUE );
 }
 
@@ -768,5 +768,5 @@
 {
 	yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name );
-	add_chat_buddy( inv->c, inv->ic->username );
+	add_chat_buddy( inv->c, inv->ic->acc->user );
 	g_free( inv->name );
 	g_free( inv );
@@ -798,5 +798,5 @@
 	
 	for( m = members; m; m = m->next )
-		if( g_strcasecmp( m->data, ic->username ) != 0 )
+		if( g_strcasecmp( m->data, ic->acc->user ) != 0 )
 			add_chat_buddy( inv->c, m->data );
 	
