adds before_filter for logged/unlogged user