add before_action to controller template. closes #119