Users are unable to login due to an extra space that is at the end of their username for their email for example: "test@test.com " - this is not an exact match causing a username/email error. Can the username field call .trim() on all inputs?
You can workaround this issue in a couple of ways:
You could use an Action script to update the username to strip the whitespace at the end. You could do this either in a pre-user registration post-login action script, depending on whether the user signs up as usual, or if you create the user on their behalf.
You could perform an export of these users, strip the white space at the end, and import them back into your database connection.
Ultimately, finding the root cause of this problem might be a good idea to save on overhead and complexity.