Shradda,
You could use the native login widgets provided by Mendix. This guide will give you some information: https://docs.mendix.com/refguide7/authentication-widgets
Hope that helps,
Mike
It shows the error how to link name and password attributes from user entity to login form...see the picture.