Fix: session's hostname wrongly assigned

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: add missing pthread_join in sessiond

Signed-off-by: David Goulet <dgoulet@efficios.com>