Introduce authentication and basic authorization in the server.

- When enabled, all requests must be authorized using an authorization token
- Token is acquired by authenticating with a username/password tuple.
I've added an IllegalUsernameException. I'd like to keep them as two distinct exceptions in the method signature, because different parts of the code will treat them differently (eg. in some cases, like when just changing the token, getting IllegalTokenException is ok to just rethrow, while getting IllegalUsername is a fatal problem, and vice versa)