Credential management automation

Initial set of service principal and other login tests.
Also fixes issues with get-azureenvironment and piping (without it the tests don't work)

I suspect these are all tabs. Should we use spaces instead ?