function loginUser() {
    fetch('/login').then(response => response.json()).then(data => {
        window.location.replace(data.logInOutUrl);
    });

}
// redirect page to login upon "login/out" button click
redirect page to login upon "login/out" button click
redirect page to login upon " login / out " button click
function loginUser() {
    fetch('/login').then(response => response.json()).then(data => {
        window.location.replace(data.logInOutUrl);
    });
}
function loginUser ( ) { fetch ( '/login' ) . then ( response => response . json ( ) ) . then ( data => { window . location . replace ( data . logInOutUrl ) ; } ) ; }
redirect page to login upon "login/out" button click
redirect page to login upon " login / out " button click