update momentjs trying to get rid of moment is not defined error in /app/helpers/format-date.js
fix moment issue by adding it as variable in function
fix the posts route to return the promise, ensuring that logged in users see /posts but logged out users get redirected back to public