Login using new user with the same email rather than existing user

image

so this is the bug that i cached up, when I tried to logged into erp as a customer, the existing default name is finexpay however the system is creating a new customer account with a name finexpay-7

I can assume that the erp has a bug in the login page, can anyone solve this issue? thanks