diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 224cec9650ef444e04cbfde527919ef86cabc81b..65d7aac7d6ae2103e7d020de6e5c3b3eea13d8a7 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -684,7 +684,6 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
 		
 		if (LLPanelLogin::sInstance->mPasswordModified)
 		{
-			authenticator = LLSD::emptyMap();
 			// password is plaintext
 			authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
 			authenticator["secret"] = password;
@@ -695,6 +694,15 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
             if (credential.notNull())
             {
                 authenticator = credential->getAuthenticator();
+                if (authenticator.emptyMap())
+                {
+                    // Likely caused by user trying to log in to non-system grid
+                    // with unsupported name format, just retry
+                    LL_WARNS() << "Authenticator failed to load for: " << username << LL_ENDL;
+                    // password is plaintext
+                    authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
+                    authenticator["secret"] = password;
+                }
             }
         }
 	}
diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp
index 72d7cf1e4522eebcf56bfb455976d79dd7abc000..fe14f2b495d15c0f069139e3da4e0b37eab3970d 100644
--- a/indra/newview/llsecapi.cpp
+++ b/indra/newview/llsecapi.cpp
@@ -117,7 +117,7 @@ LLSD LLCredential::getLoginParams()
 		else if (mIdentifier["type"].asString() == "account")
 		{
 			result["username"] = mIdentifier["account_name"];
-			result["passwd"] = mAuthenticator["secret"];
+			result["passwd"] = mAuthenticator["secret"].asString();
 			username = result["username"].asString();
 		}
 	}