Added cookies support and sessions