I've just tried the code you posted, and it works for me.. if one or both of the fields are blank, the form doesn't submit and it displays an error message. I notice your validation errors are set from PHP - have you tried checking that $logerror['user'] and $logerror['pass'] actually contain strings?

unfortunately no. It is in my Wamp server in my PC. I is not a big deal for the login page. I may put the page online to start getting feedback (still far way from finished) maybe tomorrow. I you want and don't mind I Will send you a PM when it is online.

There is a strange thing. In the contact form validation script, there is also an extra closing brace and parenthesis, like in the login. If I take it out the validation stops working. Only works with that 'extra closing brace and parenthesis'

This code needs to be in the header. It shows error or info messages as required for na amount of time (3000 ms in this case), like if you enter the wrong login credencials there is a message saying that which is controled by that litle script. I don't see how it can interact with the login form validation.