Revert "Revert "Add test for existing vanity_id cookie.""

* This reverts commit a0480c80768f4d2f800692282a248bddd2c9285f.
* Fix broken test.