This no longer works as of 2018.3 It times out at LoginWithCredentials. Increasing the timeout doesn't help, it will hang forever. Works great in all previous versions though.