login and logout functions in facebook.js, better clean-up after logout