Implement proper secure remote calls

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>