Need Help to Create Login and Sign Up Page with Session

Hi all,

I really need an help here to create a login and sign up page in Node-Red with session and page redirect (to indicate successful and failure with username). I'm able to create the pages and functions, but stuck at session and page redirect part. Username and password will be managed in MySQL database. The following consists of two types of flow for login. I'm not sure which one is the correct method to implement here.

Flow 1

[{"id":"f7511300.c34c4","type":"mui_form","z":"6ddaac4.fd62654","name":"login-form","label":"<center><font color=\"#004080\">Welcome to <b>I4</b>Inari</font></center>","group":"b4e7b289.a5dd4","order":0,"width":0,"height":0,"options":[{"label":"Username","value":"username","type":"text","required":true},{"label":"Password","value":"password","type":"password","required":true}],"formValue":{"username":"","password":""},"payload":"","topic":"","x":100,"y":120,"wires":[["69c991a1.ab4da"]]},{"id":"69c991a1.ab4da","type":"function","z":"6ddaac4.fd62654","name":"select-query","func":"//Read username and password\nvar username = {payload: (msg.payload.username)};\nvar password = {payload: (msg.payload.password)};\n\n//SELECT Query\nmsg.topic=\"SELECT COUNT(*) AS count FROM users WHERE name='\" + username.payload + \"' AND user_name='\" + password.payload + \"'\";\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":120,"wires":[["2417a41b.7a67bc"]]},{"id":"2417a41b.7a67bc","type":"mysql","z":"6ddaac4.fd62654","mydb":"272ea16.4569d5e","name":"database","x":440,"y":120,"wires":[["f1d2d3f5.96db4"]]},{"id":"f1d2d3f5.96db4","type":"function","z":"6ddaac4.fd62654","name":"check","func":"var count = msg.payload[0].count;\n\nif (count > 0)\n{\n    msg.payload = \"Login successful\";\n}\nelse\n{\n    msg.payload = \"Login failed\";\n}\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":120,"wires":[["9a1cb371.7387c"]]},{"id":"9a1cb371.7387c","type":"mui_text","z":"6ddaac4.fd62654","group":"b4e7b289.a5dd4","order":0,"width":0,"height":0,"name":"login-result","label":"","format":"{{msg.payload}}","layout":"col-center","x":750,"y":120,"wires":[]},{"id":"b4e7b289.a5dd4","type":"mui_group","z":"","name":"Welcome to I4Inari","tab":"c6b47aa.71d9788","order":2,"disp":false,"width":"6","collapse":false},{"id":"272ea16.4569d5e","type":"MySQLdatabase","z":"","host":"192.168.3.10","port":"3306","db":"ram_test","tz":""},{"id":"c6b47aa.71d9788","type":"mui_tab","z":"","name":"I4Inari","icon":"home","order":1}]

At this flow, I'm aware that we are able to use ui control to redirect to another tab. However, I'm stuck at the syntax {tab:"tab_name"}. I'm unable to redirect the tab. I did add a function node and pass this syntax via msg.payload, but it didn't work.

Flow 2

[{"id":"38350c2b.4548d4","type":"http in","z":"6ddaac4.fd62654","name":"","url":"/login","method":"get","upload":false,"swaggerDoc":"","x":100,"y":240,"wires":[["1d5300c7.b0ac5f"]]},{"id":"1d5300c7.b0ac5f","type":"template","z":"6ddaac4.fd62654","name":"login-page","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n    <meta name=\"description\" content=\"\">\n    <meta name=\"author\" content=\"\">\n    <link rel=\"icon\" href=\"https://i.forbesimg.com/media/lists/companies/inari-amertron_416x416.jpg\">\n\n    <title>I4Inari</title>\n\n    <!-- Bootstrap core CSS -->\n    <link href=\"https://getbootstrap.com/docs/4.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\">\n\n    <!-- Custom styles for this template -->\n    <link href=\"https://getbootstrap.com/docs/4.1/examples/sign-in/signin.css\" rel=\"stylesheet\">\n  <script type=\"text/javascript\"></script><link rel=\"stylesheet\" type=\"text/css\" href=\"https://getbootstrap.com/B1D671CF-E532-4481-99AA-19F420D90332/netdefender/hui/ndhui.css\" /></head>\n\n  <body class=\"text-center\"><script type=\"text/javascript\" language=\"javascript\" src=\"https://getbootstrap.com/B1D671CF-E532-4481-99AA-19F420D90332/netdefender/hui/ndhui.js?0=0&0=0&0=0\"></script>\n    <form class=\"form-signin\" method=\"post\">\n      <img class=\"mb-4\" src=\"https://i.forbesimg.com/media/lists/companies/inari-amertron_416x416.jpg\" alt=\"\" width=\"125\" height=\"125\">\n      <h1 class=\"h3 mb-3 font-weight-normal\">Welcome to <b>I4</b>Inari</h1>\n      <label for=\"inputEmail\" class=\"sr-only\">Username</label>\n      <input type=\"text\" id=\"inputEmail\" class=\"form-control\" name=\"username\" placeholder=\"Username\" required autofocus>\n      <label for=\"inputPassword\" class=\"sr-only\">Password</label>\n      <input type=\"password\" id=\"inputPassword\" class=\"form-control\" name=\"password\" placeholder=\"Password\" required>\n      <div class=\"checkbox mb-3\">\n        <label>\n          <input type=\"checkbox\" value=\"remember-me\"> Remember me\n        </label>\n      </div>\n      <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Login</button>\n      <p class=\"mt-5 mb-3 text-muted\">&copy; <script>document.write(new Date().getFullYear());</script> Inari Amertron Berhad</p>\n    </form>\n  </body>\n</html>","output":"str","x":330,"y":240,"wires":[["9d0fc3ce.ac8af"]]},{"id":"d5793e1e.c48be","type":"function","z":"6ddaac4.fd62654","name":"select-query","func":"//Read username and password\n//var username = {payload: (msg.payload.username)};\n//var password = {payload: (msg.payload.password)};\n\n//SELECT Query\nmsg.topic=\"SELECT COUNT(*) AS count FROM users WHERE name='\" + msg.payload.username + \"' AND user_name='\" + msg.payload.password + \"'\";\n\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":300,"wires":[["3e1d510c.94da4e"]]},{"id":"3e1d510c.94da4e","type":"mysql","z":"6ddaac4.fd62654","mydb":"272ea16.4569d5e","name":"database","x":500,"y":300,"wires":[["f9338ee5.2e00e"]]},{"id":"f9338ee5.2e00e","type":"function","z":"6ddaac4.fd62654","name":"check","func":"var count = msg.payload[0].count;\n\nif (count > 0)\n{\n    msg.payload = \"Login successful, \";\n}\nelse\n{\n    msg.payload = \"Login failed, \";\n}\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":300,"wires":[["7314ec56.e4aff4","3e1cc7b4.977c78"]]},{"id":"9d0fc3ce.ac8af","type":"http response","z":"6ddaac4.fd62654","name":"","statusCode":"","headers":{},"x":1070,"y":240,"wires":[]},{"id":"7314ec56.e4aff4","type":"debug","z":"6ddaac4.fd62654","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":300,"wires":[]},{"id":"925066a5.4d5a38","type":"http in","z":"6ddaac4.fd62654","name":"","url":"/login","method":"post","upload":false,"swaggerDoc":"","x":110,"y":300,"wires":[["d5793e1e.c48be"]]},{"id":"3e1cc7b4.977c78","type":"template","z":"6ddaac4.fd62654","name":"result-page","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Result: {{payload}}","output":"str","x":850,"y":360,"wires":[["9d0fc3ce.ac8af"]]},{"id":"272ea16.4569d5e","type":"MySQLdatabase","z":"","host":"192.168.3.10","port":"3306","db":"ram_test","tz":""}]

At this flow, I'm able to get the result but I don't want the same url display the result. How to make the result to be displayed in another URL with username(session)?

Experts, kindly come forward and help as this is not only for me. If this is done, we are able to simply develop any kind of web application with ease using Node-Red. Node-Red will be used as the most productive tool to develop web applications moving forward.

For those who are helping, kindly provide a demo application so that it would be the best reference for all of us. A standard web application with MySQL database connection will do.

1 Like

I found a node called node-red-contrib-users which looked like could fix this issue i'm trying to solve too. I thought It could work cause it allows you to create the users and the node acts like a switch so it looked like fine. Although I'm still not able to find the way to configure the logout.

2 Likes

Hello mannirivera

Check this flow out: https://flows.nodered.org/flow/1ed5266570fd1a9080a5a4c77270d8b4

I'm using this a bit adapted to my need with making an auto logout after 5 minutes in order to write a global variable to lock or unlock some switches or functionalities on my system.

As example restart raspi or nodered service:

This is unlocked:

image

And this is logged:

image

In another post I also posted some feature I was doing to hide buttons depending on the state of a global variable, as example if TV is on:

image

but if TV is off:

image

If you look at you will find also some post with documentation in order to show and hide tabs with control_ui node, that maybe is interesting also for you and I'm also using for some feature.

Regards

1 Like

Thank you for the information David... the thing is that... this way to use it could work for your application but not so much for mine... due to the fact that yes it will provide some password security to the system. Although just one user can be logged at a time. That's the problem. In my app the users register information in the database, I wanted o limit the access to submit the form just to registered users. What I have done in the meanwhile is to set an extra field in which in order to submit information the users have to put their password and if not the information wont be added to the database.

1 Like

Hey,
you might have already solved this since it has been 21 days
but just in case you haven't, let me tell you that in the "ui_control"
node it is stated "or just the tab name". So just send a msg.payload = "Your_Tab_Name" .
I've been using it like this in every app.

Edit: 21 days since the last comment

Regards

Hello community,

I am trying all day to find an answer to the question above. I have made an /ui form with username and password fields an I am able to "login" by hiding the Login Form if the user enters the right credentials, and showing the Main Forms.

But this does not solve the problems mannirivera72 posed. If I login from my pc, upon visiting the /ui from my smartphone(or another pc), no login is required. No user sessions are used. And last but not least, logout can only be achieved again by ui_control, hiding the Main Forms and showing the Login Form.

Am I missing something here? Is there an obvious way to have User Sessions in Node-Red that I haven't stumbled upon yet?

Thank you for your time,
John

can you paste /ui login form...

1 Like

Hi guys,

here's a login flow I've been working on which so far is perfectly fine for my needs.

Multiple usernames can be used for logging in, but since there is no real multi-user session for Node Red, in this flow we can neither have 2 users being logged in at the same time.
(Find the discussions about multiple-user-sessions here: Multiple session problem)

That being said, let's dive into the flow:
Firstly, what you need for this flow are ofc node-red-dashboard and a package called 'node-red-contrib-queue-gate'.

As currently configured, there are 2 users stored directly into the "Check UN" (UN = username) node, namely "Username1" and "Username2". The Regex

^Username1$|^Username2$

ensures that usernames must be exactly written like that and that the input does not allow something similar like Username123 or LUsername1. As for the "Check PW" (PW = password) node, a regex expression is not needed. You can make a simple equals ("==") check here.

What I also added - but I'm not 100% sure if this is properly working - is to sanitize the inputs before I write them into flow variables. If anyone can give feedback about this, it would be highly appreciated!
UPDATE: Looks like this doesn't work in the set nodes right after the input nodes (password / username).

sanitizer.value(req.name, 'string')

From: https://stackoverflow.com/questions/46718772/how-i-can-sanitize-my-input-values-in-node-js
Not really sure if we need it, but if I were to open my dashboard to the public, I'd really love to have sanitizers in place in order to block nasty SQL injections or other malicious code..

Maybe a nice addition is to fetch username(s) & password(s) from a database or a file, but I leave this exercise to you.

Without further ado, here's my flow. Hope this helps someone. And if anyone finds errors, please let me know!

My Login-Flow (single-user-session)

[{"id":"76fd797.485aa88","type":"tab","label":"Login","disabled":false,"info":""},{"id":"cca9f730.5b8708","type":"ui_text_input","z":"76fd797.485aa88","name":"Enter PW","label":"password","tooltip":"","group":"d8e69abb.fdd8d8","order":2,"width":2,"height":1,"passthru":true,"mode":"password","delay":"200","topic":"credentials","x":560,"y":400,"wires":[["e13af06e.0e8c4"]]},{"id":"fc54cae8.bd9de8","type":"switch","z":"76fd797.485aa88","name":"Check PW","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"hello123","vt":"str"},{"t":"eq","v":"","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":690,"y":780,"wires":[["4f38850a.c1f62c"],,["4cdd0cf6.ac8ed4"]]},{"id":"5630fdfd.7e5014","type":"template","z":"76fd797.485aa88","name":"Successful login","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<font color="green">{{flow.un}} logged in.","x":1380,"y":880,"wires":[["b5f9e672.ed92c8"]]},{"id":"781db5f1.34d9ac","type":"template","z":"76fd797.485aa88","name":"Error in Login","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<font color="red">Wrong Login/PW!","x":1380,"y":800,"wires":[["b5f9e672.ed92c8","51c2491.ce40cb8"]]},{"id":"b5f9e672.ed92c8","type":"ui_text","z":"76fd797.485aa88","group":"50a85feb.4bbc8","order":1,"width":4,"height":1,"name":"Login Response","label":"","format":"{{msg.payload}}","layout":"row-left","x":1560,"y":840,"wires":},{"id":"d70f5e66.59e81","type":"change","z":"76fd797.485aa88","name":"Disable PW-Field","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":460,"wires":[["cca9f730.5b8708"]]},{"id":"36234ec0.40b632","type":"ui_button","z":"76fd797.485aa88","name":"","group":"50a85feb.4bbc8","order":2,"width":2,"height":1,"passthru":false,"label":"Logout","tooltip":"Logout","color":"","bgcolor":"","icon":"logout","payload":"","payloadType":"str","topic":"credentials","x":1610,"y":440,"wires":[["1301def4.d9e611","871a97b0.6595f8","28b485ed.566cea","47e76942.938d28","494f9d3.f510564","6341fa01.5d4c34"]]},{"id":"9441491d.d69aa8","type":"change","z":"76fd797.485aa88","name":"Enable Logout-Btn","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1390,"y":680,"wires":[["36234ec0.40b632"]]},{"id":"eabdea67.ac66a8","type":"inject","z":"76fd797.485aa88","name":"Inject","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"credentials","payload":"","payloadType":"str","x":110,"y":220,"wires":[["1301def4.d9e611","47e76942.938d28","871a97b0.6595f8","28b485ed.566cea","494f9d3.f510564","6341fa01.5d4c34"]]},{"id":"1301def4.d9e611","type":"change","z":"76fd797.485aa88","name":"Disable Logout-Btn","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1390,"y":220,"wires":[["36234ec0.40b632"]]},{"id":"871a97b0.6595f8","type":"change","z":"76fd797.485aa88","name":"Enable PW-Field","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":400,"wires":[["cca9f730.5b8708"]]},{"id":"b881c739.7cf5a8","type":"ui_text_input","z":"76fd797.485aa88","name":"Enter UN","label":"username","tooltip":"","group":"d8e69abb.fdd8d8","order":1,"width":2,"height":1,"passthru":true,"mode":"text","delay":"50","topic":"credentials","x":560,"y":520,"wires":[["10694353.70671d"]]},{"id":"660abd33.bf4784","type":"change","z":"76fd797.485aa88","name":"Disable UN-Field","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":560,"wires":[["b881c739.7cf5a8"]]},{"id":"28b485ed.566cea","type":"change","z":"76fd797.485aa88","name":"Enable UN-Field","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":520,"wires":[["b881c739.7cf5a8"]]},{"id":"bfb6b5b1.ec55b8","type":"switch","z":"76fd797.485aa88","name":"Check UN","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^Username1$|^Username2$","vt":"str","case":false},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":680,"y":840,"wires":[["38bf3358.516ecc"],["d049171e.5d7188"]]},{"id":"a43d815a.53e4","type":"debug","z":"76fd797.485aa88","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1350,"y":840,"wires":},{"id":"47e76942.938d28","type":"change","z":"76fd797.485aa88","name":"Empty Payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":220,"wires":[["b881c739.7cf5a8","cca9f730.5b8708","b5f9e672.ed92c8"]]},{"id":"38bf3358.516ecc","type":"q-gate","z":"76fd797.485aa88","name":"q-gate","controlTopic":"control","defaultState":"queueing","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","queueCmd":"queue","defaultCmd":"default","triggerCmd":"trigger","flushCmd":"flush","resetCmd":"reset","peekCmd":"","dropCmd":"","statusCmd":"","maxQueueLength":"1","keepNewest":false,"qToggle":false,"persist":false,"x":1170,"y":840,"wires":[["9441491d.d69aa8","5630fdfd.7e5014","a43d815a.53e4","5ae1f054.737d5","d70f5e66.59e81","660abd33.bf4784","5ac92e48.0f74"]]},{"id":"d049171e.5d7188","type":"change","z":"76fd797.485aa88","name":"reset","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":900,"wires":[["38bf3358.516ecc"]]},{"id":"4f38850a.c1f62c","type":"change","z":"76fd797.485aa88","name":"flush","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"flush","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":760,"wires":[["38bf3358.516ecc"]]},{"id":"31967aae.edf866","type":"ui_ui_control","z":"76fd797.485aa88","name":"Show Logout","events":"change","x":1570,"y":960,"wires":[]},{"id":"4cdd0cf6.ac8ed4","type":"change","z":"76fd797.485aa88","name":"reset","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":800,"wires":[["fc6b6502.43ccb8"]]},{"id":"fc6b6502.43ccb8","type":"delay","z":"76fd797.485aa88","name":"Delay","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":990,"y":800,"wires":[["781db5f1.34d9ac","38bf3358.516ecc"]]},{"id":"e13af06e.0e8c4","type":"change","z":"76fd797.485aa88","name":"set flow.pw","rules":[{"t":"set","p":"pw","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":400,"wires":[["4a6bf8c0.0f9668"]]},{"id":"94070e44.5133b","type":"ui_button","z":"76fd797.485aa88","name":"","group":"d8e69abb.fdd8d8","order":3,"width":2,"height":1,"passthru":false,"label":"Login","tooltip":"","color":"","bgcolor":"","icon":"login","payload":"","payloadType":"num","topic":"credentials","x":330,"y":820,"wires":[["884f9558.4c4f98","a6bf1760.047938"]]},{"id":"884f9558.4c4f98","type":"change","z":"76fd797.485aa88","name":"read flow.pw","rules":[{"t":"set","p":"payload","pt":"msg","to":"pw","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":800,"wires":[["fc54cae8.bd9de8","191bfc34.f18484"]]},{"id":"a6bf1760.047938","type":"change","z":"76fd797.485aa88","name":"read flow.un","rules":[{"t":"set","p":"payload","pt":"msg","to":"un","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":840,"wires":[["bfb6b5b1.ec55b8","c109ccc5.bd717"]]},{"id":"10694353.70671d","type":"change","z":"76fd797.485aa88","name":"set flow.un","rules":[{"t":"set","p":"un","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":520,"wires":[["37c293b3.609e0c"]]},{"id":"51c2491.ce40cb8","type":"debug","z":"76fd797.485aa88","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1550,"y":800,"wires":},{"id":"5ae1f054.737d5","type":"change","z":"76fd797.485aa88","name":"Disable Logout-Btn","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":840,"wires":[["94070e44.5133b"]]},{"id":"494f9d3.f510564","type":"change","z":"76fd797.485aa88","name":"Enable Logout-Btn","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":800,"wires":[["94070e44.5133b"]]},{"id":"5ac92e48.0f74","type":"change","z":"76fd797.485aa88","name":"set msg.payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{"group":{"hide":["Management_Login"],"show":["Management_Logout"],"focus":true}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1390,"y":960,"wires":[["31967aae.edf866"]]},{"id":"3b6f3942.729716","type":"ui_ui_control","z":"76fd797.485aa88","name":"Show Login","events":"change","x":2070,"y":440,"wires":[]},{"id":"6341fa01.5d4c34","type":"change","z":"76fd797.485aa88","name":"set msg.payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{"group":{"hide":["Management_Logout"],"show":["Management_Login"],"focus":true}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1900,"y":440,"wires":[["3b6f3942.729716"]]},{"id":"4a6bf8c0.0f9668","type":"debug","z":"76fd797.485aa88","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":890,"y":400,"wires":},{"id":"37c293b3.609e0c","type":"debug","z":"76fd797.485aa88","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":890,"y":520,"wires":},{"id":"c109ccc5.bd717","type":"debug","z":"76fd797.485aa88","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":900,"wires":},{"id":"191bfc34.f18484","type":"debug","z":"76fd797.485aa88","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":720,"wires":},{"id":"d8e69abb.fdd8d8","type":"ui_group","name":"Login","tab":"1eea47fd.237178","order":1,"disp":true,"width":"6","collapse":false},{"id":"50a85feb.4bbc8","type":"ui_group","name":"Logout","tab":"1eea47fd.237178","order":2,"disp":true,"width":"6","collapse":false},{"id":"1eea47fd.237178","type":"ui_tab","name":"Management","icon":"dashboard","order":1,"disabled":false,"hidden":false}]