Not needed, as Mendix has this already build for you
- By turning on security, you will automatically get the default login.html with username/pw input and login button with login logic
- By turning on security and having Anonymous users enabled, you can create your own login page using the authentication widgets or the Login form page template.