Maybe it is not completely clear.
With the current Zenphoto, your theme has no need for the `checkForPassword()` function as the theme scripts will not be loaded unless the page is accessable. There is not an easy way to tell if someone visiting an unprotected page is logged in though.
If you are using `checkforPassword(true)` from the wordpress it will return `true` if a password was needed (the form is not displayed because of the `silent` parameter). This is also true if you use the function from your theme, but you will not be executing the call unless the login is already acomplished.
So, if I understand correctly, you want a sidebar to display on your gallery pages (except for the password form page) if the user is logged in. So you should be able to just display the sidebar on each script except the password form one.