Session timeout fix + various improvements