title: Session resume problem with Strophe attach and Ejabberd
body: <p>I'm having a lot of difficulty getting strophe's 'attach()' function working. </p>
  
  <p>I am working on a social network where users will be surfing pages and at the same time keep their chat connection on. I don't want to reconnect/reauthorize on every page so as per this link, <a href="http://groups.google.com/group/strophe/browse_thread/thread/430da5e788278f3a/93c48c88164f382f?show_docid=93c48c88164f382f&amp;fwc=1" rel="nofollow noreferrer">http://groups.google.com/group/strophe/browse_thread/thread/430da5e788278f3a/93c48c88164f382f?show_docid=93c48c88164f382f&amp;fwc=1</a>, i am storing the SID and RID into a cookie onunload.</p>
  
  <p>On the next page when i try to use the new SID and RID (after incrementing it by 1) my session is already destroyed. Ejabberd reports "Error on HTTP put. Reason: bad_key"</p>
  
  <p>WTF is happening?</p>