changing pages and before_filter to login