When you receive a HTTP Error 401 (unauthorized) during upgrading, this means that the upgrade has already done. And you can check it from your Admin panel.
To keep your website accessibility, in the version N+1, after you updated files, the upgrade can be done by visiting any URL of your website. So, if your website is already in live (in production), it’s possible that you have never need to run domain.tld/upgrade.
Before starting upgrade you have to:
Clear your website caches (from the Admin panel).
Put your website under maintenance (from the Admin panel).
Start the upgrade by following the upgrade steps in the documentation.
After running the upgrade by visiting the URL domain.tld/upgrade your website will be back in live.
Done.