Added a few  before_filter security functions