();
            if (errors) {
                var message = errors == 1 ? 'You missed 1 field. It has been highlighted' : 'You missed ' + errors + ' fields. They have been highlighted';
                $("div.error").html(message);
                $("div.error").show();
            } else {
                $("div.error").hide();
            }
        }
        ,rules : {
            username: {
                required: true
                ,minlength: 3
            }
            ,password: {
              