Fixed API Token check