diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 41f6637..7765873 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -1485,6 +1485,16 @@ empathy_account_settings_created_cb (GObject *source,
   else
     {
       priv->account = g_object_ref (account);
+
+      if (priv->supports_sasl && priv->password != NULL)
+        {
+          /* Save the password before connecting */
+
+          empathy_keyring_set_account_password_async (priv->account, priv->password,
+              empathy_account_settings_set_password_cb, settings);
+          return;
+        }
+
       empathy_account_settings_discard_changes (settings);
     }
 
