You need a database table of registered users to verify that the user name and password entered in the login page are valid. Use your database application and a registration page to create the table. For more information, see Building a registration page.
The next step in building a login page is to add an HTML form to the page to let users log in. See Letting users log in.