Added validation to login form and prevent request being sent unless username and password are provided.