Closed #7: Fix a bug that cookie is null