Localstorage is probably the best way to track whether someone is logged in or not via javascript. Nothing security-critical should be there (at least I don't think it should), but some stuff like username and user_id would be fine. Since I'm already returning this data via JSON on successful login, it shouldn't be too difficult to take that data and shove it into localstorage.
Localstorage is probably the best way to track whether someone is logged in or not via javascript. Nothing security-critical should be there (at least I don't think it should), but some stuff like username and user_id would be fine. Since I'm already returning this data via JSON on successful login, it shouldn't be too difficult to take that data and shove it into localstorage.