How to fix login with Facebook and go to tabs page twice

Please help me solve this problem.

I am using the cordova-plugin-facebook4 to do the login with Facebook but after logged in with Facebook it goes to root tab twice like this picture

image

On the other hand, the login in normally way like username password it works perfectly fine.

This is the code to go to the tabs page