fix default login on windows

getenv("USER") doesn't work on windows. Also winapifunctions use utf16 strings.
``login`` could benefit from becoming a const reference, since it previously was a const pointer.