before action and session