fix return value of read_line
fix | vs || typo in socket handling in main
remove unused variable
add additional token number check
set challenge_type to INVALID initially
fix token number check
remove unused/unnecessary variable assignments
fix potential memory leaks
fix potentially uninitialized variable in TLS session handling