I have a login page.
it checks with the db (could also be hardcoded, if you have only 2 users as you wrote) whether the pwd/id combination is valid. if yes, the script sets a session variable userid and one for the password.
-> lookup sessions, session_register
in the top of each protected script, before anything is put out, this check is done again: is the pwd/id combination in the session vars valid? if no -> loginpage.
if the user clicks logout, -> loginpage.
at the start of the loginpage, the session is destroyed, and immediately after that started again.
-> session_destroy
the user check can sit in an include library file and return true if the combination id/pwd is valid.
-> include, function, return, global
good luck!