Retrieves password reset e-mail and extracts the login link.
public function getResetURL() {
// Assume the most recent email.
$_emails = $this
->drupalGetMails();
$email = end($_emails);
$urls = array();
preg_match('#.+user/reset/.+#', $email['body'], $urls);
return $urls[0];
}