Added Cloud Code

Added cloud code to validate saving trips on the server side. The code
is in main.js.