express javascript node.js response

How to use express response to stay in the same page without redirect?

Consider a simple form which takes email as input. Submit button calls a bootstrap modal in case authentication failed. If at success, it redirects to the next view.

When bootstrap modal appears, the browser is constantly loading the page, waiting a response.

I am using this code on server side:'/', (req, res) => {
.then(user => {
if (user) {
obj =

I tried to add an else statement in case user is not found:

else  {
console.log('User not found')

I do not want to redirect to the same page because modal will not work.

Is there a res method in order to achieve this?