Fixed the session cookie bug