Managed to resolve this with the help of the following code from http://css.dzone.com/articles/create-your-own-wordpress
add_action( 'authenticate', 'pu_blank_login');
function pu_blank_login( $user ){
// check what page the login attempt is coming from
$referrer = $_SERVER['HTTP_REFERER'];
$error = false;
if($user == null || $_POST['pwd'] == '')
{
$error = true;
}
// check that were not on the default login page
if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') && $error ) {
// make sure we don't already have a failed login attempt
if ( !strstr($referrer, '?login=failed') ) {
// Redirect to the login page and append a querystring of login failed
wp_redirect( $referrer . '?login=failed_empty' );
} else {
wp_redirect( $referrer );
}
exit;
}
}
This works perfectly in conjunction with my originally posted code and covers both failed login attempts and failed login attempts where the password and username fields are empty
EDIT
Actually scrap that, the snipped works but seems to stop me from logging in successfully, wierd………..