Make session identifier and set cookies