Fixed some session/logout issues