Modified session creation to cope with non redirect case