it can be done using PHP but I suggest a different approach
store the users in a database and validate against that user table
The content each user can see is driven by a content table. The content table holds everything a user can access including text and downloads etc. Like a micro CMS