backport some windows user management

DO NOT MERGE

I want to run the tests on this and evaluate this solution.