add basic authentication code to usage sample code

This information can be found in the documentation, but I think it's a common enough use case that it should be part of the basic usage code in the README.