I think the best way to extent the login functionality nowadays is to follow this guide: https://medium.com/mendix/enabling-security-and-adding-a-login-page-ba092a82f09b
Just use a page in your app as a login page with anonymous user role allowed to enter that page.
Add this login page in a specific module, so you can limit the impact of this anonymous user role in your app.
In this way, you can add as much input fields and business logic to your login flow as you need.
Hi Ridhwik,
The custom stuff Bart describes in his blog do not contain extra input fields, but are based on the given 2 parameters: username and password.
If you need an extra field (domain), there are several solutions possible, but all are require quite some customization.
Good luck!
Johan