Allow client to use basic authentication

- Added Javadoc
- Added tests
- Added integration test