private void startAuthenticationActivity(){
  Intent intent=new Intent(ServerDetails.this,AuthenticationActivity.class);
  intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  startActivity(intent);
}

private void startAuthenticationActivity ( ) { Intent intent = new Intent ( ServerDetails . this , AuthenticationActivity . class ) ; intent . setFlags ( Intent . FLAG_ACTIVITY_CLEAR_TOP ) ; startActivity ( intent ) ; }
this method is called to open authenticationactivity .
