Improve demo to prevent fatal error with fluent interface and fix an inconsistent path for cookie