This is a simple API framework that meant to be accessed 2 ways.
a base domain, example.com and api.example.com
example.com can respond with html or JSON. JSON will be returned if
the ajax headers are set (HTTP_X_REQUESTED_WITH). PHP Sessions will
keep track of the users loged in permissios.
api.example.com will always return JSON. PHP Sessions as well as signed
resuests will keep track of users loged in.
the nonAPI html views are optional and can easily be turned off. setting
the API constant to true will disablr HTML responses.