        url: '{{.basePath}}/login',
                dataType: 'json',
                contentType: "application/json",
                data: JSON.stringify(data),
                success: function(data) {
                    document.getElementById("message").innerHTML = `<p style="color:green">${data['message']}</p>`;
                    // redirect after logging in successfully
                    redirectNext();
                },
                error: function(jqXHR, exception) {
                    co