Catch auth errors in winrm and properly raise errors

Fixes #7875