Adding validation on register page and error message on login page