refactored facebook token check