Some fixes to the security context for the streaming code
Only store principal if the token is signed
Fixing some systests