Support authentication on buckets.

cbugg: close bug-700 bug-698