I have implemented errors handling in ASP.NET MVC site in a way like suggests this post.
With 404 errors all works fine. But how correctly show user friendly screen
If you're using ASP.NET MVC, you're more than likely to use IIS, so why don't you just set up IIS to use your custom 401 error page for that Web Application / Virtual Directory?