Added loading mask in login form and fixed markInvalid on failure