Access database with cookie.