Added sessions and flash messages