Couple fixes, properly free connection before exit. add pointer to auth function to ssh_conn_t to make easier to reauthenticate session.