add auto pairing and cookie support