Added database for user tokens and methods to check if they're valid

Also added tests for this of course.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>