Fixed bugs that caused spoticli to segfault when session was created