fix for bug that caused redirect to login.php when trying to search