HTTP authentication is better than using cookies. Cookies aren't designed for authentication, they are harder to use, insecure non-standard.
You can find
here some scripts for HTTP authetication.
For storing your information you will need a database and a script to write the dates in your database.