
window.setTimeout(function() {
    $(".alert").fadeTo(500, 0).slideUp(500, function(){
        $(this).remove(); 
    });
}, 3000);
 


$("#login_form").validate({
    rules: {
        username: {
            required: true,
        },
        password: {
            required: true,
        }
    },
    messages: {
        username: {
            required: "Username is mandatory",
        },
        password: {
            required: "Password is mandatory",
        }
    }
});




$('#login_form').on('submit',function(e){
    e.preventDefault();
    $("#login_form").validate();
    if($("#login_form").valid()){        
            $('#login_form')[0].submit();
        
    }
});






