Adding the client side code for the sample app.