Login form now checks validity