Encode basic auth infomation once during object construction.
Clean up imports