r(response) {
        // handle jwt token
        var accessToken = response.headers[tokenKey];
        var silkyResultStatus = response.headers[silkyResultStatusKey];
        if (accessToken && accessToken != "invalid_token") {
            window.localStorage.setItem(tokenKey, accessToken);
            ui.preauthorizeApiKey("Bearer", accessToken);
        } else if (accessToken == "invalid_token") {
            window.localStorage.removeItem(tokenKey);
            ui.authActions.logout(["Bearer"]);
       