Improved tagging with nonces and better cookie checking