Adds before_filter to filter for login and authority.