Server code for the PhoneGuardian app