The login.txt file goes into the main gallery2 directory. Say you wanted to have your gallery at mysite.com/gallery2 then it would be in the gallery2 directory. Just what sort of errors were you getting exactly? I don't have a whole lot of experience with gallery2 but I did get it to install and am using it with drupal so I might be able to help you.
The Insane Cabbit
PM for CMS or forum install.
[color=#CC0000]$97 Off[/color] with promo code pixiedust