fixed logout function on the search page (closes #151)