Fix connection when no cookie is given

This patch corrects a regression introduced in 2edd8bee1208aef77f92209f737c376063681bf7
Merge pull request #1796 from hardening/nego_fix

Fix connection when no cookie is given