Removed some console.log statements which should not have been there.
Added some extra debug output, and now using 'session middleware' as a key, rather than 'session'.