y>
<script>
    function redirectNext() {
        const urlParams = new URLSearchParams(window.location.search);
        const nextURL = urlParams.get('next');
        if (nextURL && /(?:^\/[a-zA-Z_])|(?:^\/$)/.test(nextURL.trim())) {
            window.location.href = nextURL;
        } else {
            window.location.href = '/{{.basePath}}';
        } 
    }
</script>
<script>
    $(document).ready(function () {
        $('form').on('submit', function(e) {
            e.preventDefault();
            $(