Fix category toggling

refactored logic into own object
toggle license start and endtime validity
set license state onload
Merge branch 'feature-toggleFormStates' into development