fix setting cookie max age
add option for cookie domain