Add additional options for cookies such as httponly and max age.

Also makes secure a flag instead of a key value pair.