Simplifying verifyToken() by re-using some existing functionality