Hi,
There is already a widget/form available in the app store named as LoginForm. Although the interface is not pretty much but yeah can use it. Further It does come with a login button which you can further use it in your "custom" login form. https://appstore.home.mendix.com/#1379848692343-188.