Save cookie on changed URL