you won't find a simple script that provides an entire user system I'm afraid
you'll want a server side scripting language (php/asp/asp.net) and a database to keep everything in (mysql/mssql/access and so on)
you'll want to put an id number for each photo into the database, then make the register page put the user into the database, and then link them together
You have quite a lot of learning to do to make this work, but I hope I've pointed you in the right direction, come back with any specifics