Fix bug with unauthenticated users on search.