Server side logic for SenseDroid