Magento - How to check if email entered during login is registered with the website?
===

I'm trying to tell the user which of their email address or password entered during login was wrong instead of the default "Invalid email or password" error. 

I went to the relevant controller file:

.../app/code/core/Mage/Customer/controllers/accountcontroller.php

and changed the code from line 141 to:

    catch (Mage_Core_Exception $e) {
         switch ($e->getCode()) {
              case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
					if(Zend_Validate::is($login['username'], 'EmailAddress'))
						$message = $this->__('Wrong password.');
					else
						$message = $this->__('That email address was not found.');
                        //$message = $e->getMessage();
    break;

I used Zend_Validate::is() from the forgotPasswordPostAction() function in the same file to check if the email was registered or not. But it doesn't work during login. I always get the 'Wrong password' message even if the email is not registered.

Is it because I'm using Zend_Validate::is() wrong? What would be the correct function to check if the email is registered or not?

Thanks!