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)

Non-blocking, but I wonder if this shouldn't be part of the connection string for azure accounts