Well lets see
1. your first issue sounds like a conflict with another hack so its not really an issue with our code I would suspect. If you disable that hack your plugin should work. If I am following this thread.
2. Your gallery is locked down from viewing so as a guest that views the site the W3C errors your noting are vbulletin errors not gallery errors. I would beleive that is the standard error login template in vb
that your error is at. Now if you enable guests to view the gallery then possibly we can look at any w3c errors that might exist.