Fixed bug with session when running unit tests from command line. The se...

...ssion was not killed completely when logged out, after 2 attemps of log in there was no way to logout (command line)