added code to read the user cookie