Also, its not the search that logs people out, its that the search uses the hardcoded domain as specified in the configuration file (as far as i can tell by pure speculation; so where user is logged into yoursite.tld theh search uses
www.yoursite.tld where the user has not logged into...