Log in to SharePoint 2016 with form-based authentication

I have developed a SharePoint application with a custom login page using forms-based authentication and active policy

Now I want to register the unsuccessful attempt to login to the application, as well as who is logging into the system.

Help from plase