Send preferredDb when loading autocomplete. Save preferredDb in cookie. Fixes #20
Bugfix for issue #20 (was not looking up the preferred DB in cookie)