title: Logout Facebook session and launch login Activity
body: <p>I'm using a Facebook button for login in a project. This button is located in LoginActivity, once I log in, it does things right and launch me to the expected Activity. </p>
  
  <p>The problem is in that activity because I have another Facebook button to log out the session. I want that once that I log out the application takes me again to Login Activity. But it does nothing, it just changes the button status.</p>
  
  <p>This is the code of the activity with the button that must take me again to Login Activity.</p>
  
  <pre><code>public class Main_Menu extends AppCompatActivity {
  
      LoginButton mFacebookButton;
      CallbackManager mCallBackManager;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_menu_principal);
  
          mCallBackManager = CallbackManager.Factory.create();
          mFacebookButton = (LoginButton)findViewById(R.id.fb_menu_button);
  
          mFacebookButton.registerCallback(mCallBackManager, new FacebookCallback&lt;LoginResult&gt;() {
              @Override
              public void onSuccess(LoginResult loginResult) {
                  LoginManager.getInstance().logOut();
                  goLoginActivity();
  
              }
  
              @Override
              public void onCancel() {
              }
  
              @Override
              public void onError(FacebookException error) {
  
              }
          });
      }
  
      private void goLoginActivity() {
          Intent i = new Intent(Main_Menu.this, LoginActivity.class);
          i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          finish();
          startActivity(i);
      }
  
      @Override
      public void onBackPressed() {
          super.onBackPressed();
          System.exit(0);
      }
  }
  </code></pre>
  
  <p>What can I do in order to launch the login Activity?
  Greetings!</p>