Update secret token initialisation.
Fix controller for new ActiveRecord syntax.