Fix #1 bug and added parse cookies

 i didn't thought about send headers. Sorry for my mistakes.