add destroyCookie method

abstract the cookie deletion stuff into a method that can be called externally