diff --git a/modules/apps/login/login-web/src/main/resources/META-INF/resources/login.jsp b/modules/apps/login/login-web/src/main/resources/META-INF/resources/login.jsp
index 588ac7bba07280585eef33d954c3f196a22ed9ad..86429e7b80908659d97c01ae5e1815f719d330e1 100644
--- a/modules/apps/login/login-web/src/main/resources/META-INF/resources/login.jsp
+++ b/modules/apps/login/login-web/src/main/resources/META-INF/resources/login.jsp
@@ -122,7 +122,15 @@
 					</div>
 				</c:if>
 
-				<liferay-ui:error exception="<%= AuthException.class %>" message="authentication-failed" />
+				<c:choose>
+					<c:when test="<%= company.isSendPasswordResetLink() %>">
+						<liferay-ui:error exception="<%= AuthException.class %>" message="authentication-failed-due-to-incorrect-credentials-or-account-lockout" />
+					</c:when>
+					<c:otherwise>
+						<liferay-ui:error exception="<%= AuthException.class %>" message="authentication-failed" />
+					</c:otherwise>
+				</c:choose>
+
 				<liferay-ui:error exception="<%= CompanyMaxUsersException.class %>" message="unable-to-log-in-because-the-maximum-number-of-users-has-been-reached" />
 				<liferay-ui:error exception="<%= CookieNotSupportedException.class %>" message="authentication-failed-please-enable-browser-cookies" />
 				<liferay-ui:error exception="<%= NoSuchUserException.class %>" message="authentication-failed" />
@@ -130,26 +138,14 @@
 				<liferay-ui:error exception="<%= UserEmailAddressException.MustNotBeNull.class %>" message="please-enter-an-email-address" />
 				<liferay-ui:error exception="<%= UserLockoutException.LDAPLockout.class %>" message="this-account-is-locked" />
 
-				<liferay-ui:error exception="<%= UserLockoutException.PasswordPolicyLockout.class %>">
-
-					<%
-					UserLockoutException.PasswordPolicyLockout ule = (UserLockoutException.PasswordPolicyLockout)errorException;
-					%>
-
-					<c:choose>
-						<c:when test="<%= ule.passwordPolicy.isRequireUnlock() %>">
-							<liferay-ui:message key="this-account-is-locked" />
-						</c:when>
-						<c:otherwise>
-
-							<%
-							Format dateFormat = FastDateFormatFactoryUtil.getDateTime(FastDateFormatConstants.SHORT, FastDateFormatConstants.LONG, locale, TimeZone.getTimeZone(ule.user.getTimeZoneId()));
-							%>
-
-							<liferay-ui:message arguments="<%= dateFormat.format(ule.user.getUnlockDate()) %>" key="this-account-is-locked-until-x" translateArguments="<%= false %>" />
-						</c:otherwise>
-					</c:choose>
-				</liferay-ui:error>
+				<c:choose>
+					<c:when test="<%= company.isSendPasswordResetLink() %>">
+						<liferay-ui:error exception="<%= UserLockoutException.PasswordPolicyLockout.class %>" message="authentication-failed-due-to-incorrect-credentials-or-account-lockout" />
+					</c:when>
+					<c:otherwise>
+						<liferay-ui:error exception="<%= UserLockoutException.PasswordPolicyLockout.class %>" message="authentication-failed" />
+					</c:otherwise>
+				</c:choose>
 
 				<liferay-ui:error exception="<%= UserPasswordException.class %>" message="authentication-failed" />
 				<liferay-ui:error exception="<%= UserScreenNameException.MustNotBeNull.class %>" message="the-screen-name-cannot-be-blank" />