Adds before hooks to clear cookies.