Revert "Revert "Improve testing of cookies in functional tests:""

This reverts commit ba117b2b43a00c282bb4905fb003dd169a5312df.
Merge pull request #25 from square/backport-cookies-fix

Revert "Revert "Improve testing of cookies in functional tests:""