updated app.js to handle redirect