Detect token type

For some reason travis is saying that the secret token is not set, although it should be. Need to investigate why.