improve cookie handling
add request class
use Request class