Added in routes some checks of req.user for empty value.
Added checks of empty values to app.js in PostsController.findAll in ajax response