Modifying index.js to redirect to home in case of a successful login