Added timeout feature to session.