Added support for automatically logging out user on session expire