Added support for logout