I'm currently building out a ICS 4.0+ Android app that will require authentication. The issue I'm having is handling checking for login status when:

* User first opens the app
* User returns to app after closing (resuming)

The behavior I'm looking for is that there is a "loading..." splash screen if the app is removed from memory and reopened, and then an almost unnoticeable splash screen when the user returns to app upon resuming (still in memory).

The code I currently have for checking this is:

```
    public static void checkUserStatus(Context context, boolean isPassive) {
    Log.d(TAG, "Checking user status..");
    // User is logged in and has cc
    if ( APIUtil.isLoggedIn() && UserAccount.getCreditCards().size() > 0 && isPassive == false) {
        Intent intent = new Intent(context, OtherActivity.class);
        context.startActivity(intent);
    // User is logged in but has no cc
    } else if (APIUtil.isLoggedIn() && UserAccount.getCreditCards().size() == 0) {
        Intent intent = new Intent(context, ManageCCActivity.class);
        context.startActivity(intent);
    // User is not logged in
    } else if(isPassive == false) {
        Intent intent = new Intent(context, HomeActivity.class);
        context.startActivity(intent);
    }
}

```

checkUserStatus is called in onResume() of every activity. The idea being that it'll check this and redirect accordingly, but the behavior is wacky and inconsistent and it just feels janky.

Are there any examples of authentication flow out there? Ideas? Suggestions?