updated tests for malformed and expired tokens