Well, when you wrote the custom login plugin, it looks like you have a new column that stores user email. In that case, first disable the plugin, log in with your credentials and activate the plugin.
Also, make sure that you have an option to connect existing account to the account created using the plugin.
Hope that helps!