Rename util.state_ref to state_trans.
Add util.state_trans description.
A little refatoring in authserver.session module.