User can edit profile through My Preference and can set duplicate username
User can edit User Name from My Preferences page.
As such it is possible for user to set a user name which is already being used.
And if that happens, all the login attempts with any user with that user name fails.
Users should not be allowed to edit User name from My Preference page and there should be a check for duplicate User name.