first working version

-cookies for username and ticket
-url parameters parser
-minor other fixes