Added cookie reading functionality.