add beforeunload
Merge branch 'master' of https://github.com/cfromknecht/hackmit