Fixed issues with session-refresh logic.

135u