Misc fixes

Some various fixes.

- SMTP authentication fix
The settings to force SMTP authentication were retrieved as a string from the DB.
So, it was always true regardless of the value.

- Lost password
There was two syntax errors in some SQL commands which prevent users to recover their passwords.