Added support for device registration

Added support for device registration.