Add session and flash as globals
Fix access to flash global