Fixed bugs with password resets

Issue #5