IIS differentiates these cases with sub-status codes (reference):
- 401 = User is not logged in, but login is required
- 401.1 = The user tried to login but their credentials are not valid.
- 401.3 = The user's credentials are valid but the user is not authorized to see the resource.