added support for cookies so that search is saved on refresh