Add cookie support and basic test