Support both MongoDB and redis

Adds support for MongoDB and redis.

Actually allows the implementation of new backends for storing tokens/gotoURLs.