Suport email as login

Added more logic to the smf-auth file to check to see if the login is an
email or not. If it's an email, it'll look up the username by the email.
Then try to login with the username and password. If the login is the
username, it'll just login normally with the username and password.

If there is an error at any point, the whole process will quit and
return while closing all connections to the DB.

This allows users to login with either their username or their email.

To support users that have the '@' symbol in their username, the
passOkAll stored procedure is always called. If the login contains a '@'
symbol, the system will try to find a matching username, thinking it's
an email. If nothing is found, it'll default back to the whatever the
login was originally and try to login with that.