Use before_filter

Fork me on GitHub