Added registration and login form validation, with appropriate messages coloured depending on context.