SPA: add the setCredential method

setCredential send the credential to the SPA subworker.
It should be called before connect or autoconnect.