minor clean up
Add Basic Auth support, close #1649