How do I change the 401 error that is caused when I cancel a username/password login window for a protected directory?

To change the error message that a user receives, use cPanel's Error Pages interface (Home >> Advanced >> Error Pages). Choose the domain for which you wish to modify the error pages.

Select any of your error pages to make your changes.