Added overloads to fix comparison of enumeration types and integral values
Added a session_failed callback to handle session establishment failures (fixes #14)