#28 #31 automating authentication in rest endpoints using res.auth