updated handler for successful registration to server-side code