finished up the code for accepting devices and subscriptions from registering apps