diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.c b/WebKit/gtk/webkit/webkitsoupauthdialog.c
index 2eefcc5..e721f98 100644
--- a/WebKit/gtk/webkit/webkitsoupauthdialog.c
+++ b/WebKit/gtk/webkit/webkitsoupauthdialog.c
@@ -19,8 +19,6 @@
 
 #include "config.h"
 
-#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-
 #include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 #include <libsoup/soup.h>
@@ -46,6 +44,9 @@ static void detach(SoupSessionFeature* manager, SoupSession* session);
 
 enum {
     CURRENT_TOPLEVEL,
+    SAVED_USERS_FOR_AUTH,
+    SAVED_PASSWORD_FOR_AUTH,
+    SAVE_PASSWORD,
     LAST_SIGNAL
 };
 
@@ -81,6 +82,81 @@ static void webkit_soup_auth_dialog_class_init(WebKitSoupAuthDialogClass* klass)
                    webkit_marshal_OBJECT__OBJECT,
                    GTK_TYPE_WIDGET, 1,
                    SOUP_TYPE_MESSAGE);
+    /**
+     * WebKitSoupAuthDialog::saved-users-for-auth:
+     * @authDialog: the object on which the signal is emitted
+     * @message: the #SoupMessage being used in the authentication process
+     * @auth: the #SoupAuth being authenticated
+     *
+     * This signal is emitted by the @authDialog when it needs to know
+     * what users the application has saved passwords for for this
+     * message and auth domain.
+     *
+     * Return value: (type GSList) (element-type utf8) (transfer full):
+     * a list of usernames of users for which passwords are cached
+     *
+     * Since: 1.3.7
+     */
+    signals[SAVED_USERS_FOR_AUTH] =
+      g_signal_new("saved-users-for-auth",
+                   G_OBJECT_CLASS_TYPE(object_class),
+                   G_SIGNAL_RUN_LAST,
+                   G_STRUCT_OFFSET(WebKitSoupAuthDialogClass, saved_users_for_auth),
+                   NULL, NULL,
+                   webkit_marshal_POINTER__OBJECT_OBJECT,
+                   G_TYPE_POINTER, 2,
+                   SOUP_TYPE_MESSAGE,
+                   SOUP_TYPE_AUTH);
+    /**
+     * WebKitSoupAuthDialog::saved-password-for-auth:
+     * @authDialog: the object on which the signal is emitted
+     * @message: the #SoupMessage being used in the authentication process
+     * @auth: the #SoupAuth being authenticated
+     * @user: the user whose password is needed
+     *
+     * This signal is emitted by the @authDialog when it needs to know
+     * the saved password corresponding to a particular user.
+     *
+     * Return value: (transfer full): the password
+     *
+     * Since: 1.3.7
+     */
+    signals[SAVED_PASSWORD_FOR_AUTH] =
+      g_signal_new("saved-password-for-auth",
+                   G_OBJECT_CLASS_TYPE(object_class),
+                   G_SIGNAL_RUN_LAST,
+                   G_STRUCT_OFFSET(WebKitSoupAuthDialogClass, saved_password_for_auth),
+                   NULL, NULL,
+                   webkit_marshal_STRING__OBJECT_OBJECT_STRING,
+                   G_TYPE_STRING, 3,
+                   SOUP_TYPE_MESSAGE,
+                   SOUP_TYPE_AUTH,
+                   G_TYPE_STRING);
+    /**
+     * WebKitSoupAuthDialog::save-password:
+     * @authDialog: the object on which the signal is emitted
+     * @message: the #SoupMessage being used in the authentication process
+     * @auth: the #SoupAuth being authenticated
+     * @user: the user whose password to save
+     * @password: the password to save
+     *
+     * This signal is emitted by the @authDialog when the user has
+     * requested that the given user/password combination be saved.
+     *
+     * Since: 1.3.7
+     */
+    signals[SAVE_PASSWORD] =
+      g_signal_new("saved-password-for-auth",
+                   G_OBJECT_CLASS_TYPE(object_class),
+                   G_SIGNAL_RUN_LAST,
+                   G_STRUCT_OFFSET(WebKitSoupAuthDialogClass, save_password),
+                   NULL, NULL,
+                   webkit_marshal_VOID__OBJECT_OBJECT_STRING_STRING,
+                   G_TYPE_NONE, 4,
+                   SOUP_TYPE_MESSAGE,
+                   SOUP_TYPE_AUTH,
+                   G_TYPE_STRING,
+		   G_TYPE_STRING);
 }
 
 static void webkit_soup_auth_dialog_init(WebKitSoupAuthDialog* instance)
@@ -114,12 +190,11 @@ static void free_authData(WebKitAuthData* authData)
     g_slice_free(WebKitAuthData, authData);
 }
 
-#ifdef SOUP_TYPE_PASSWORD_MANAGER
 static void save_password_callback(SoupMessage* msg, WebKitAuthData* authData)
 {
     /* Anything but 401 and 5xx means the password was accepted */
     if (msg->status_code != 401 && msg->status_code < 500)
-        soup_auth_save_password(authData->auth, authData->username, authData->password);
+        g_signal_emit(authData->manager, signals[SAVE_PASSWORD], 0, msg, authData->auth, authData->username, authData->password);
 
     /* Disconnect the callback. If the authentication succeeded we are
      * done, and if it failed we'll create a new authData and we'll
@@ -128,7 +203,6 @@ static void save_password_callback(SoupMessage* msg, WebKitAuthData* authData)
 
     free_authData(authData);
 }
-#endif
 
 static void response_callback(GtkDialog* dialog, gint response_id, WebKitAuthData* authData)
 {
@@ -140,13 +214,11 @@ static void response_callback(GtkDialog* dialog, gint response_id, WebKitAuthDat
 
         soup_auth_authenticate(authData->auth, authData->username, authData->password);
 
-#ifdef SOUP_TYPE_PASSWORD_MANAGER
         if (authData->checkButton &&
             gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(authData->checkButton))) {
             g_signal_connect(authData->msg, "got-headers", G_CALLBACK(save_password_callback), authData);
             freeAuthData = FALSE;
         }
-#endif
     }
 
     soup_session_unpause_message(authData->session, authData->msg);
@@ -183,13 +255,9 @@ table_add_entry(GtkWidget*  table,
     return entry;
 }
 
-static gboolean session_can_save_passwords(SoupSession* session)
+static gboolean manager_can_save_passwords(SoupSessionFeature* manager)
 {
-#ifdef SOUP_TYPE_PASSWORD_MANAGER
-    return soup_session_get_feature(session, SOUP_TYPE_PASSWORD_MANAGER) != NULL;
-#else
-    return FALSE;
-#endif
+    return g_signal_has_handler_pending (manager, signals[SAVE_PASSWORD], 0, FALSE);
 }
 
 static void show_auth_dialog(WebKitAuthData* authData, const char* login, const char* password)
@@ -311,7 +379,7 @@ static void show_auth_dialog(WebKitAuthData* authData, const char* login, const
 
     gtk_entry_set_visibility(GTK_ENTRY(authData->passwordEntry), FALSE);
 
-    if (session_can_save_passwords(authData->session)) {
+    if (manager_can_save_passwords(authData->manager)) {
         rememberBox = gtk_vbox_new(FALSE, 6);
         gtk_box_pack_start(GTK_BOX(vbox), rememberBox,
                            FALSE, FALSE, 0);
@@ -332,10 +400,8 @@ static void session_authenticate(SoupSession* session, SoupMessage* msg, SoupAut
     SoupURI* uri;
     WebKitAuthData* authData;
     SoupSessionFeature* manager = (SoupSessionFeature*)user_data;
-#ifdef SOUP_TYPE_PASSWORD_MANAGER
     GSList* users;
-#endif
-    const char *login, *password;
+    char *login, *password;
 
     soup_session_pause_message(session, msg);
     /* We need to make sure the message sticks around when pausing it */
@@ -350,14 +416,17 @@ static void session_authenticate(SoupSession* session, SoupMessage* msg, SoupAut
 
     login = password = NULL;
 
-#ifdef SOUP_TYPE_PASSWORD_MANAGER
-    users = soup_auth_get_saved_users(auth);
+    users = NULL;
+    g_signal_emit(authData->manager, signals[SAVED_USERS_FOR_AUTH], 0, authData->msg, auth, &users);
     if (users) {
+        GSList* u;
         login = users->data;
-        password = soup_auth_get_saved_password(auth, login);
+        for (u = users->next; u; u = u->next)
+            g_free(u->data);
         g_slist_free(users);
     }
-#endif
+    if (login)
+        g_signal_emit(authData->manager, signals[SAVED_PASSWORD_FOR_AUTH], 0, authData->msg, auth, login, &password);
 
     show_auth_dialog(authData, login, password);
 }
diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.h b/WebKit/gtk/webkit/webkitsoupauthdialog.h
index db0ccb8..5e847ea 100644
--- a/WebKit/gtk/webkit/webkitsoupauthdialog.h
+++ b/WebKit/gtk/webkit/webkitsoupauthdialog.h
@@ -42,6 +42,9 @@ typedef struct {
     GObjectClass parent_class;
 
     GtkWidget* (*current_toplevel) (WebKitSoupAuthDialog* authDialog, SoupMessage* message);
+    GSList* (*saved_users_for_auth) (WebKitSoupAuthDialog* authDialog, SoupMessage* message, SoupAuth* auth);
+    char* (*saved_password_for_auth) (WebKitSoupAuthDialog* authDialog, SoupMessage* message, SoupAuth* auth, const char* user);
+    void (*save_password) (WebKitSoupAuthDialog* authDialog, SoupMessage* message, SoupAuth* auth, const char* user, const char* password);
 } WebKitSoupAuthDialogClass;
 
 WEBKIT_API GType
diff --git a/WebKit/gtk/webkitmarshal.list b/WebKit/gtk/webkitmarshal.list
index 5372c57..38e11d8 100644
--- a/WebKit/gtk/webkitmarshal.list
+++ b/WebKit/gtk/webkitmarshal.list
@@ -22,4 +22,6 @@ VOID:OBJECT,POINTER,POINTER
 VOID:OBJECT,STRING
 VOID:STRING
 VOID:STRING,STRING
-
+POINTER:OBJECT,OBJECT
+STRING:OBJECT,OBJECT,STRING
+VOID:OBJECT,OBJECT,STRING,STRING
