using database to store tokens