making app.js changes for listening to firebase