Within the Create NewUser flow you should have a parameter with the entered userdata. You can use exclusive splits to check if the attributes you want are filled correctly. You could even check if there is an existing user with the same username (retrieve from user where name is $inputobject/name)
Let the login button activate a Nanoflow.
In this nanoflow,
If the credentials are correct the user will be redirected to the given homepage.
If the credentials are not correct, Mendix will create validation feedback.
It is a bad practice to retrieve users, because you open up the list of users and somebody who is not authenticated can spoof the user list (by entering different user names).
Hope this helps.