Enkito edit link is not forcing login. Instead ends in error

I have created a php page which generates enkito edit link for record editing. It was working fine last month. Previously, while opening enkito edit url, if the user is not logged in it popups with login form.

Now if the user is not logged in ,it ends with error

Screenshot attached

@Lakshmikanthlr, maybe this post discussed previously should help you solve your issue: