Check for session before returning API data. Issue: medic/medic-webapp#586