Fixed bug where tokens where stored unhashed in the database