deal with post and cookie