rest api WIP
Support for other auth types.
Merge commit 'bdce87b242abbff800020deba0a5c2031fc2efe7' into feature-restapi

Conflicts:
	framework/db/BaseActiveRecord.php