Modular auth

Added a hook based mechanism to facilitate modular authentication and authorisation.
Existing authentication and authorisation are implemented, and now other parties can write
plugins for their own implementations.

Todo so the plugin must implement the functions in inc/auth.inc.php and /inc/users.inc.php
These functions must perform the same tasks, and return the same datatypes.