fixed login/logout with new Aes library