You need to go back to basics. I'll outline the approach because a full answer is about 5 chapters of a book on web-app development.
Firstly you will need to render an HTML page that presents a login form to the user. That form should include the Username and Password fields. Google-it to discover how to make such a form if you don't know.
Behind the above-mentioned form sits your PHP, indeed the PHP is basically squirting out the HTML in question.
When the form is submitted this raises a PHP call which should supply username and password variables. For example if you have posted variables "user" and "password" you can obtain these in PHP using $user = $_REQUEST['user'] and $password = $_REQUEST['password'].
It's likely that you will also want to use Session variables. These are the things that allow you to have persistence of a login within the current browser session - e.g. no need to login again if you open another tab into your app within the same browser session. Again, you'll need to research into Session variables.
The DB is not in itself a big deal and there's nothing in your description of the problem that constrains or even guides the DB design. I think that you're probably more puzzled about the fundamentals of how this stuff fits together. A very simple DB with a single table that stores allowed usernames and passwords (two columns plus a unique primary key for good practice).
I encourage you to go back to the basics yourself. Get a basic HTML form able to load from your server (in a browser), with a submit button that sends the form to the server, and some PHP able to then digest the submitted form data. Once you have that
working you're in a position to start on the user-login side of things.
Here's an example
that doesn't do exactly what you want but it's quite similar and should provide a good starting point.