Hooking up the API to the frontend