slight refactor of session model class to be more robust in saving only attributes