Updated SecureCookie to match api changes.