Multi User tracking

I need to have an app where I can allow users to log in to an Android Phone.
The only purpose of this is to keep a register of who used the device at what time.
The profile, app permissions and content will be shared by all the users, so no need to create different profiles.

Does an extension like this exist, or where do I start?

I changed the category. The extension category is only for publishing extensions.

You want to record who used your phone?
TinyDB can be used to do so.

TinyDB can be used to log the events, and store the users paccodes to unlock. How do I actually lock and unlock the phone.
Like a login and logout ?