Remove usage of pg client.
Add support for authentication to rest client.