Fixed merge conflicts, but I think cookies will need to be changed if we want browser support