Added support for device registration

Added support for device registration with a Register method for devices
and a ValidateRegistration method for admin applications.