bugfix logout error
unittests added