function loginUser(email, password) {
        $.post("/api/login", {
                email: email,
                password: password
            })
            .then(function() {
                window.location.replace("/home");
                // If there's an error, log the error
            })
            .catch(function(err) {
                console.log(err);
            });
    }
// loginUser does a post to our "api/login" route and if successful, redirects us the the members page
loginUser does a post to our "api/login" route and if successful, redirects us the the members page
loginUser does a post to our " api / login " route and if successful redirects us the the members page
function loginUser(email, password) {
        $.post("/api/login", {
                email: email,
                password: password
            })
            .then(function() {
                window.location.replace("/home");
            })
            .catch(function(err) {
                console.log(err);
            });
    }
function loginUser ( email , password ) { $ . post ( "/api/login" , { email : email , password : password } ) . then ( function ( ) { window . location . replace ( "/home" ) ; } ) . catch ( function ( err ) { console . log ( err ) ; } ) ; }
loginUser does a post to our "api/login" route and if successful, redirects us the the members page
loginUser does a post to our " api / login " route and if successful redirects us the the members page
// If there's an error, log the error