moved push registration to onReady function