Issue #344 fix - User test session fix + phpunit fix

Was trying to use user session before was initialised, so added to the test `setUp` method.

phpunit was complain about not being about to find `ReflectionException: Class TokenMismatchException does not exist` on my local and on Travis CI, would be nice to have green unit tests again so people can merge pull requests.