reset password fix

Back-porting reset password from #2403.

**Reset Password** should be tested using the link on the login page.

WARNING: It is very important to test if it failed on reseting password for LDAP user

output:

```
---------- MESSAGE FOLLOWS ----------
Date: Fri, 19 Sep 2014 11:33:30 +0100 (BST)
From: email@example.com
To: test@example.com
Message-ID: <1095604325.0.1411122810915.JavaMail.ola@Mac-Book-Pro.local>
Subject: OMERO - Reset password
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Peer: 127.0.0.1

Dear Test User (test) your new password is: CvCo8enKoD
------------ END MESSAGE ------------
```