Miscellaneous cleanup.

Fixes a bug for initial guest session creation – the token was being
set to the session identifier rather than its signature.
Insert tags from array instead of building query dynamically.

This is nicer.