fix redirect logic in memberships controller