Added authentication to the webclient.

The webclient authenticates via the rest api and the SSO.
The cookie for the rest api is sent with each request.