For Neos password protected pages. When the login session is expired, users get a “Page Not Found” page. How do I customise this to include a log in form?
I didn’t test it yet, but I recently stumbled upon https://www.neos.io/download-and-extend/packages/sitegeist/sitegeist-movealong.html and it might help you
You can use https://www.neos.io/download-and-extend/packages/moc/moc-notfound.html and point to “login” instead of “404” if you like.
However it can’t differentiate between the page actually not existing and when a page cannot be accessed due to restrictions. That would require some custom code to achieve. You could fork the package and add the logic to it.
FYI: The fact that inaccessible & non-existing behaves the same was done on purpose in order to prevent information disclosure. Working around that might have an impact on the security of your system