Did you check whether the SessionTimeOutHandler() method is getting called at all? because when I added a button as below it's working fine for me if I click the button!
<input type="submit" onclick="javascript:SessionTimeOutHandler();" value="Log Off" />