How can i add validation to this login form with out it redirecting to the wp-login.php page

Im using the code as posted on the website below, to create a hard coded login form.
http://www.wprecipes.com/add-a-login-form-on-your-wordpress-theme

What would be the best way of incorperating some validation with this or using the default wordpress error messages?

the whole point in hard coding the form is that the user isnt taken away from the content to the default wp-login.php page throughout the login process.

Regards, Tom Kiddle

Solutions Collecting From Web of "How can i add validation to this login form with out it redirecting to the wp-login.php page"