Added support for logging off