set a cookie for the state on geoip and on typehead switch. don't use geoip if you have the cookie. closes #579