search.php: fixed logged-off JS error