new session and cookie handler with after/before