jbuck/express-persona — pull request #4 by clux (2012-10-13 07:35:06+00:00)
Title: trying to set headers after being sent

got a crash with the above, moving the headers to the top seemed to work for me.
https.request docs suggested putting .end() before error handlers also.

anyway, thanks for this module, made the process a lot easier :)
btw, mozilla now suggests using [navigator.id.watch](https://developer.mozilla.org/en-US/docs/Persona/Quick_Setup#Step_3.3A_Watch_for_login_and_logout_actions) for doing the client side xhr.