Registering service worker.