Added update document and get cookie