check connect set cookie

Closes #25