Add server tokens interface.
Move database calls into Model.