added devices api, added device api tests.
Merge remote-tracking branch 'origin/master'
added user_devices api and tests