Fix session redirect, add resources argument