If you use an authorization field in the database to keep track of who's logged in and logged out,
you are going to end up with a lot of queries to the database.
Proper security requires you to check their logged in status every time the user goes to a new page.
That's the purpose of using a cookie or a session variable.
Cookies can time out, and that can be very useful if there is no activity for a while.
And session variables are stored in memory, that can make traversing your website a lot faster.
Sense you created the module, you should be able to come up with a unique key for the session variable or cookie in question.
I have seen many sites where you have to login several times depending on what area of the site you are accessing.
And it's possible to have unique usernames and passwords for each area.
Some areas of the site log you out when you leave the area.
While the main part of the site keeps you logged in.
There are several ways to go about this.
But using the database to keep track of your login status, will create a lot of extra activity on the server and may use up your bandwidth in a very short time.