in reply to login authentication

Welcome to Perlmonks!

Hopefully this is for a "learning" project, and nowhere near a production system.

There are many technologies involved : CGI, DBI, Sessions/persistence - too much to go into with your general question.

Instead, I'll direct you toward Chapter 20: Password Protection, where the script
register2.cgi directly answers your question.

I'm sure you will run into trouble with this, so feel free to come back here with a more specific question, and show us what you have tried.

                All power corrupts, but we need electricity.