updated app.js
separated the code for the lgoin page d3 animation