+ """A convenience function for loginasync.
+
+ This function will initiate an asynchronous login per the
+ loginasync command, and then run a select loop while waiting for
+ it to complete. It will return a tuple (res, reason), where res is
+ the result code, and reason is an explanatory text for any error.
+
+ res can be any of the following:
+ * success: Login completed successfully
+ * nologin: No authentication mechanism could be negotiated
+ * server: An error occurred on the server
+ * user: An error occurred in the library
+ * conv: The password conversation mechanism failed
+ * authfail: The server refused the login (due to e.g. bad credentials)
+ """