For the first part of your question, check the ABMFeedbak code (inlcuded in the ABMaterial package).
In the ABMApplication module, you will see how user data are stored after login, e.g.:
ws.Session.SetAttribute("authType", "local")
ws.Session.SetAttribute("authName", inp1.Text)
ws.Session.SetAttribute("IsAuthorized", "true")
ws.Session.SetAttribute("UserType", "" & user.Get("usertype") ) ' lowercase!
ws.Session.SetAttribute("UserID", "" & user.Get("userid") ) ' lowercase!
Also, in other modules of ABMFeedback, you will see how they are retrieved.
For example, in UsersPage module:
If ABMShared.NeedsAuthorization Then
If session.GetAttribute2("IsAuthorized", "") = "" Or page.ws.Session.GetAttribute2("UserType", "0") <> "1" Then
ABMShared.NavigateToPage(ws, ABMPageId, "../")
Return
End If
End If
For your MQTT question, I am not knowledgeable enough to answer.
P.S. AlwaysBusy just outposted me!