added before_filter in todo controller