Update LoginForm.php

Hi,

Now the login process is not working with username logins. I have added the functionality to login with username, but if you have more proper way to do it, I would be very greatfull if you provide or merge with this ..