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)

This method name is funny. Should we rename this to .SetCurrentSubscription ?