[feature/api] Updated to use namespaces

Rebased the project. Updated to use namespaces to
make the API work with the latest code.

Refactored the auth class a bit to make it work with
the latest code.

PHPBB3-11595