[BF] Ensure cookies ane enabled and configured correctly. Also make more robust for different schemas.