The 2 templates you need to edit are: user_loginform.html & user_logininfo.html
user_loginform.html is for when visitors are not logged into your gallery and see the username and password boxes.
user_logininfo.html is for when someone is logged into the gallery.
If you do not edit both where you want the links then you will only be able to see the navigation when you are logged in or logged out, depending on what one you edit. If you edit both then you will always see navigation.