added in a http wrapper class
fixed device registration and status reporting
added token header
adding 402 catching to http