Fixed login form validation bug