Only attempt to update a session from JUserHelper if there is a session.

If you are creating a user in a cli application updating the current session does not make sense.