added sessions and flash notices