add session and cookie management