NPE fix in maintenance mode.
@Transactional
Field tenant.
Avoid cyclic call of isDemoUser by using user instead of id.
UserGroupCache must be transient.
Multi tenancy: panta rhei.
Missed import added.