Index: doc/user-guide/commands.xml
===================================================================
--- doc/user-guide/commands.xml	(revision 16834a53f85be092acc16dee70cb72451b2230f9)
+++ doc/user-guide/commands.xml	(revision 92cb8c4c251fb04a483b29e7108e7a52388f14dd)
@@ -1114,5 +1114,5 @@
 
 	<bitlbee-command name="identify">
-		<syntax>identify &lt;password&gt;</syntax>
+		<syntax>identify [-noload|-force] &lt;password&gt;</syntax>
 		<short-description>Identify yourself with your password</short-description>
 
@@ -1124,4 +1124,12 @@
 			<para>
 				Once you're registered, you can change your password using <emphasis>set password &lt;password&gt;</emphasis>.
+			</para>
+
+			<para>
+				The <emphasis>-noload</emphasis> and <emphasis>-force</emphasis> flags can be used to identify when you're logged into some IM accounts already. <emphasis>-force</emphasis> will let you identify yourself and load all saved accounts (and keep the accounts you're logged into already).
+			</para>
+			
+			<para>
+				<emphasis>-noload</emphasis> will log you in but not load any accounts and settings saved under your current nickname. These will be overwritten once you save your settings (i.e. when you disconnect).
 			</para>
 		</description>
Index: doc/user-guide/misc.xml
===================================================================
--- doc/user-guide/misc.xml	(revision 16834a53f85be092acc16dee70cb72451b2230f9)
+++ doc/user-guide/misc.xml	(revision 92cb8c4c251fb04a483b29e7108e7a52388f14dd)
@@ -117,3 +117,20 @@
 </sect1>
 
+<sect1 id="nick_changes">
+<title>Changing your nickname</title>
+
+<para>
+BitlBee now allows you to change your nickname. So far this was not possible because it made managing saved accounts more complicated.
+</para>
+
+<para>
+The restriction no longer exists now though. When you change your nick (just using the <emphasis>/nick</emphasis> command), your logged-in status will be reset, which means any changes made to your settings/accounts will not be saved.
+</para>
+
+<para>
+To restore your logged-in status, you need to either use the <emphasis>register</emphasis> command to create an account under the new nickname, or use <emphasis>identify -noload</emphasis> to re-identify yourself under the new nickname. The <emphasis>-noload</emphasis> flag tells the command to verify your password and log you in, but not load any new settings. See <emphasis>help identify</emphasis> for more information.
+</para>
+
+</sect1>
+
 </chapter>
Index: irc_commands.c
===================================================================
--- irc_commands.c	(revision 16834a53f85be092acc16dee70cb72451b2230f9)
+++ irc_commands.c	(revision 92cb8c4c251fb04a483b29e7108e7a52388f14dd)
@@ -89,4 +89,8 @@
 			irc->status &= ~USTATUS_IDENTIFIED;
 			irc_umode_set( irc, "-R", 1 );
+			irc_usermsg( irc, "Changing nicks resets your identify status. "
+			             "Re-identify or register a new account if you want "
+			             "your configuration to be saved. See \x02help "
+			             "nick_changes\x02." );
 		}
 		
Index: root_commands.c
===================================================================
--- root_commands.c	(revision 16834a53f85be092acc16dee70cb72451b2230f9)
+++ root_commands.c	(revision 92cb8c4c251fb04a483b29e7108e7a52388f14dd)
@@ -105,12 +105,43 @@
 static void cmd_identify( irc_t *irc, char **cmd )
 {
-	storage_status_t status = storage_load( irc, cmd[1] );
+	storage_status_t status;
 	char *account_on[] = { "account", "on", NULL };
-	
-	if( strchr( irc->umode, 'R' ) != NULL )
+	gboolean load = TRUE;
+	char *password = cmd[1];
+	
+	if( irc->status & USTATUS_IDENTIFIED )
 	{
 		irc_usermsg( irc, "You're already logged in." );
 		return;
 	}
+	
+	if( strncmp( cmd[1], "-no", 3 ) == 0 )
+	{
+		load = FALSE;
+		password = cmd[2];
+	}
+	else if( strncmp( cmd[1], "-force", 6 ) == 0 )
+	{
+		password = cmd[2];
+	}
+	else if( irc->b->accounts != NULL )
+	{
+		irc_usermsg( irc,
+		             "You're trying to identify yourself, but already have "
+		             "at least one IM account set up. "
+		             "Use \x02identify -noload\x02 or \x02identify -force\x02 "
+		             "instead (see \x02help identify\x02)." );
+		return;
+	}
+	
+	if( password == NULL )
+	{
+		MIN_ARGS( 2 );
+	}
+	
+	if( load )
+		status = storage_load( irc, password );
+	else
+		status = storage_check_pass( irc->user->nick, password );
 	
 	switch (status) {
@@ -122,9 +153,10 @@
 		break;
 	case STORAGE_OK:
-		irc_usermsg( irc, "Password accepted, settings and accounts loaded" );
-		irc_setpass( irc, cmd[1] );
+		irc_usermsg( irc, "Password accepted%s",
+		             load ? ", settings and accounts loaded" : "" );
+		irc_setpass( irc, password );
 		irc->status |= USTATUS_IDENTIFIED;
 		irc_umode_set( irc, "+R", 1 );
-		if( set_getbool( &irc->b->set, "auto_connect" ) )
+		if( load && set_getbool( &irc->b->set, "auto_connect" ) )
 			cmd_account( irc, account_on );
 		break;
