adds before filter to redirect to login if not logged for edit