Please review the following blog post where you will find further information:
Note that the blog post is for Sitefinity versions 5.1 SP2 and above.
For Sitefinity 5.1 and Sitefinity 5.1 SP1 what we would suggest you is to use custom errors. These custom errors are coming from ASP.NET application. Sitefinity do not redirect users to the login page when they are not authenticated. However, this message can be handled in the customErrors element
in you web.config to automatically redirect the user to the login screen.
Change the redirect page to the page you want.
You can also handle the 401 error as well. Custom errors can be places in your web.config file of the project.
All the best,
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items