windows_user: look up username instead of resource name

Fixes #1705