Only unset coookies if no headers have been set - seems to cause intermittent issues on travis build servers