Add support for session and flashing during tests.