There was a similar question I answered here. I didn't go too far into setting up an idea on how to create the login form, although much of a logic is there.
If you can trust your users not to try to get into your python code (or compile to an .exe to make it even harder), you could create a script that will either open up the project with the layers loaded in it, or an empty project if they are unable to supply the correct credentials.
There was talk of checking the information against a server for a more secure method, which you could implement in your Postgres/PostGIS instance. You could find as a more simple stopgap to code in your user name and a hashed password into your python code that feeds to an API for verification. So let your server do the comparison instead of your desktop code. Storing your hashed password locally isn't the most secure way of doing things, but depending on your hash algorithm, it could potentially be pretty difficult to crack it.
Ultimately, it is probably more secure to just supply your credentials every time unless you know the other users aren't computer savvy enough to figure out any of the automated methods you'd supply.