Refactored for single backend
Merge branch 'mdm-dev' of github.com:WSO2Mobile/mdm into mdm-dev

Conflicts:
	controller/permissions.js
	controller/users.js
Fixes to tenantID
Merge branch 'mdm-dev' of github.com:WSO2Mobile/mdm into mdm-dev