JSFiddle - React, Tailwind, and code Playground

HTML

<form id="myForm" action="login.php" method="get">
    login > 
    <input id="log_username" name="log_username" type="text" />
    <input id="log_password" name="log_password" type="password" />
    <input id="mySubmit" type="submit" />
</form>

JavaScript

$('#mySubmit').click(function(e) {
    e.preventDefault();
    var un = $('#log_username').val();
    var pw = $('#log_password').val();
    if ( un == pw ) {
        alert('Sorry, username/password cannot be identical');
    }else{
        $('#myForm').submit();
    }
});