add cookie handler