ws: Add precondition to cockpit_web_service_get_creds()

Fixes #669
Closes #688

Reviewed-by: Stef Walter <stefw@redhat.com>