fix bugs, add cookie handle process