AEM login pop-up comes up in custom login functionality



Hi we had implemented custom authentication handler for login functionality where-in credentials are verified using SQL. This was implemented some time ago and worked perfectly fine. Currently, I see an AEM login pop-up(the one which you can see in felix console after an inactive session) is appearing on click of submit and my mapped servlet is throwing a 401 on live and 403 on publishers. This functionality is working fine on author. Any inputs how do I resolve this issue and get rid of the AEM pop-up because of which my login functionality has stopped working?





Are all of the files and OSGi bundles that are on Author (where it's working) on PUBLISH.

In the login article we have where we use the Default security hook that AEM Provides for log in functionality:

var valid = validateForm();


$.ajax({type: "POST",

url: $('#url').val(),

data: { j_username: $("#userId").val(), j_password: $("#inputPassword").val(),j_validate: "true" },

success:function(data,textStatus,jqXHR ){;



error: function(XMLHttpRequest, textStatus, errorThrown) {

$("#errordiv").val("Invalid User Name or Password");


} else{

$("#errordiv").val("Invalid User Name or Password");




All the same content must be on Publish Server. Usually when something works on Author and not Publish - settings or content are not located on the PUB instance.