Add basic authentication functionality.

Maybe we should specify a specific version?