Make cookie stealing more generic