Deregistering an application