Added session timeout logic