Note here that the session token is stored *before* the terms of use exception is thrown.  This means you can still fetch the token from the java client, as long as the exception is caught.  But in general, it would be better to use loginWithNoToU() instead.