Okay, check this source code:

```
public void checkSession() {
    SharedPreferences session = getSharedPreferences(PREFS_NAME, 1); 
    String getSession = session.getString("SESSION", null);
    Toast.makeText(this, getSession, Toast.LENGTH_SHORT).show();
    if(getSession.length() > 30) {
        Intent menu = new Intent(this, menu.class);
        startActivity(menu);
        finish();
    } 
    else 
    {   
    }
}

```

The problem is that "first time users" get crush.

When I disable the function, run the app and login the code creates session. After that when I logout, and restart the app - there's no problem. Any ideas?