Login with username

Functionality to login with username ... If you have a proper solution for this please provide or you can merge with this code . Thanx : )