class SecuredFragment extends Fragment {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        logoutListener = data -> {
            if (getActivity() != null && !getActivity().isFinishing()) {
                getActivity().finish();
            }
        };
        Event.ON_LOGOUT.addListener(logoutListener);

        if (context().IsUserLoggedOut()) {
            DrishtiApplication application = (DrishtiApplication) this.getActivity()
                    .getApplication();
            application.logoutCurrentUser();
            return;
        }
        if (getActivity() instanceof SecuredActivity) {
            formController = new FormController((SecuredActivity) getActivity());
        }
        anmController = context().anmController();
        navigationController = new NavigationController(getActivity(), anmController);
        onCreation();
    }

}