Made the server resistant to req.user being undefined sometimes.