updated controllers.js for push notifications