Added support for logging out