fixed session redirect issues