Fix segfault on unrecognized method type.
Actually set the session when session starts.

Issue #226.
Make the session available to the console.

Fixes #226.