started to split the code into functions, and now we are able to authenticate a connection
using plain SASL, we are not yet able to bind to a resource