server code almost complete !

things TODO
1) error handling when cookie does not exist
2) Handling date (number of active peers)