If the main gallery is protected by a master password, the search dialog is still working, even if the visitor does not input anything. I recently modified the index.php of the standard theme to show a tag cloud (printAllTagsAs). Each visitor can click on the tags and it works, even if he did not input a password. Those functions should be disabled until the user input the correct password. Why you don't handle all the password stuff within the htaccess file(s)?
Yes, passwords had several problems in the base release. But, you should know that if you allow search (no password on search or on the gallery) search will return thumbs of protected items. That is by design. Clicking on the thumb will get you to the protection login.