The stack trace is not complete, but anyway, I guess you are trying to access a property of the user entity (IsActive), while the entity seems out of Sync with the database.
So I think upon login, you fetch the entity, modify some fields, for example "last login date", then you save the entity, and immediately afterwards you are accessing the IsActive property.
When you save an entity to the database, please make sure you re-fetch it, to make sure all field values are in sync with the database.
To re-fetch upon save, you should find an overload of the SaveEntity() method which accepts a Boolean refetch parameter.