Made before_filters private.

Added another before_filter to reduce code duplication.