Started to fix some broken tests for the Croogo plugin

There is still some work to do, mainly mocking everything around
sessions, as session does not exist in a shell context (and tests should
NOT depend on the running environment).