If you enable that you can login with your username or your email you have to click on a button to select the login method. Why we can do a an automatical detection.
Usernames can anyway not be emails (I tested that). So the detection is distinct
@drak should I make a PR or do you think this is not a good idea?
As a configurable option, yes. But we must be able, as currently possible to have only username or email as the login.
Added hybrid login and fixed minor bugs, closes #488.