User management with log in option.

Hello everyone,
I want to add log in functionality with my existing app. There will be some scenario or option added with the login. Lets say, a user can not login to the app more than 5 times a day.

How can I add the feature with the login method. Can anyone give any references or guidelines for doing such as I am very new in this sector?

Thanks in advance.

The shinymanager package could be useful.