SPA: merge setCredentials, connect and autoconnect