[AUR-3478] Add authentication for CouchDB

- Added auth function and related test;

Change-Id: Ic25f78471a780924b7be05b7b2d49f3e3f980010