Password protect individual dynamic pages

I have a similar potential project. 100 units each with their own log in to enter meter readings and upload a file. I have Unit 1 set up as it’s own database and own dynamic page, the appropriate input fields etc, what I don’t know how to do is password protect the unit pages so only the unit owner or admin can access. I have set up basic databases this is a challenge I am trying out to see how it can be done. I was playing around with members only permissions and then got tired last night. Any insight would be great or if this has to be done with some coding please contact me and we can discuss a couple points on this clients project requests.