Added basic auth extension method.