fixed crash when using user on Windows

'os' does not have 'getlogin' funciton in Windows