fix logout and optimization of FB auth