use url_for globally, fix searching for history and jids