Adding Hooks

Added set_access_origin hook which allows for CORS. Added auth hook but
haven't implemented it.