Combining behavioural types with security analysis