diff --git a/plugins/vnc/vinagre-vnc-tab.c b/plugins/vnc/vinagre-vnc-tab.c
index 7cae9f2..73a13b8 100644
--- a/plugins/vnc/vinagre-vnc-tab.c
+++ b/plugins/vnc/vinagre-vnc-tab.c
@@ -492,11 +492,7 @@ vnc_authentication_cb (VncDisplay *vnc, GValueArray *credList, VinagreVncTab *vn
 
   if (need_password || need_username)
     {
-      /* libsecret does not support NULL attributes, bug 685041. */
-      if (vinagre_connection_get_username (conn) != NULL)
-        {
-          vinagre_tab_find_credentials_in_keyring (tab, &username, &password);
-        }
+      vinagre_tab_find_credentials_in_keyring (tab, &username, &password);
 
       if ( (need_username && !username) || (need_password && !password) )
 	{
diff --git a/vinagre/vinagre-tab.c b/vinagre/vinagre-tab.c
index 2f06e0d..4cf147a 100644
--- a/vinagre/vinagre-tab.c
+++ b/vinagre/vinagre-tab.c
@@ -745,19 +745,20 @@ vinagre_tab_get_from_connection (VinagreConnection *conn)
 gboolean
 vinagre_tab_find_credentials_in_keyring (VinagreTab *tab, gchar **username, gchar **password)
 {
+  const gchar *conn_user = vinagre_connection_get_username (tab->priv->conn);
   *username = NULL;
 
   *password = secret_password_lookup_sync (SECRET_SCHEMA_COMPAT_NETWORK, NULL, NULL,
-                                           "user", vinagre_connection_get_username (tab->priv->conn),
                                            "server", vinagre_connection_get_host (tab->priv->conn),
                                            "protocol", vinagre_connection_get_protocol (tab->priv->conn),
                                            "port", vinagre_connection_get_port (tab->priv->conn),
+                                           conn_user ? "user" : NULL, conn_user,
                                            NULL);
 
   if (*password == NULL)
     return FALSE;
 
-  *username = g_strdup (vinagre_connection_get_username (tab->priv->conn));
+  *username = g_strdup (conn_user);
   return TRUE;
 }
 
@@ -771,6 +772,7 @@ vinagre_tab_save_credentials_in_keyring (VinagreTab *tab)
 {
   GError *error = NULL;
   gchar *label;
+  const gchar *conn_user = vinagre_connection_get_username (tab->priv->conn);
 
   if (!tab->priv->save_credentials)
     return;
@@ -779,10 +781,10 @@ vinagre_tab_save_credentials_in_keyring (VinagreTab *tab)
   secret_password_store_sync (SECRET_SCHEMA_COMPAT_NETWORK, NULL,
                               label, vinagre_connection_get_password (tab->priv->conn),
                               NULL, &error,
-                              "user", vinagre_connection_get_username (tab->priv->conn),
                               "server", vinagre_connection_get_host (tab->priv->conn),
                               "protocol", vinagre_connection_get_protocol (tab->priv->conn),
                               "port", vinagre_connection_get_port (tab->priv->conn),
+                              conn_user ? "user" : NULL, conn_user,
                               NULL);
   g_free (label);
 
@@ -803,11 +805,12 @@ void vinagre_tab_remove_credentials_from_keyring (VinagreTab *tab)
 {
   if (tab->priv->saved_credentials)
     {
+      const gchar *conn_user = vinagre_connection_get_username (tab->priv->conn);
       secret_password_clear_sync (SECRET_SCHEMA_COMPAT_NETWORK, NULL, NULL,
-                                  "user", vinagre_connection_get_username (tab->priv->conn),
                                   "server", vinagre_connection_get_host (tab->priv->conn),
                                   "protocol", vinagre_connection_get_protocol (tab->priv->conn),
                                   "port", vinagre_connection_get_port (tab->priv->conn),
+                                  conn_user ? "user" : NULL, conn_user,
                                   NULL);
       tab->priv->saved_credentials = FALSE;
     }
