Authenticate method fix
Merge branch 'tenancy' into milestone5

Conflicts:
	modules/user.js
Merge branch 'milestone5' of github.com:WSO2Mobile/mdm into milestone5