Implemented code to register for remote notifications.