Fixed encoding with new database class, fixes #1343

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
Fixed https not used in passwort reset links, fixes #1344

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>