Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:39 25 Nov 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMBasic Login Server on a WebMite

Author Message
Malibu
Senior Member

Joined: 07/07/2018
Location: Australia
Posts: 262
Posted: 03:03am 22 Nov 2026
Copy link to clipboard 
Print this post

Hello all,
It's been a couple of years since I posted anything here and even longer for writing any code - It's down to the old story, things crop up and something has to give way.
I usually pop in to the forum and try to catchup when I can though.

I decided to have another play with an old idea I had (re: the title) so I downloaded the latest firmware and went from there... wow, how soon you forget things!

First thing I noticed running the new WebMite was the lack of the old unexplainable WiFi errors that would continually plague!
The only errors I've had now have been purey my own bad codeing. So MatherP, whatever you've done to fix them all has been spot-on!

Anyway, as it turns out, this code has been WAY above my skill level, so it has probably been 80% written by ClaudeAI (and about 1000 times faster than what I could have done it in too!)
It even wrote the REAME file, which describes perfectly what this is project is all about. Here's the truncated version...

  Quote  
# MMBasic Login Server (PicoMite / WebMite)

A session-based web login server for the Raspberry Pi Pico W running PicoMite (WebMite) firmware.
Written in MMBasic with plain HTML templates.

## Features

- Login with a session cookie (32-hex token, HttpOnly, SameSite=Strict, 10 minute sliding expiry)
- Up to 4 simultaneous sessions
- Per-account lockout (2 failed logins) and global lockout (3 failed logins of any name), each 5 minutes
- Admin-only settings page to add and delete users (up to 10 by default)
- One live session per account
- Users stored in `users.dat` on the Pico
- Pages are plain HTML files with `{Tag}` substitution, so they are easy to restyle

## Files

| File | Purpose |
|---|---|
| `login_server.bas` | The server program |
| `styles.css` | Shared stylesheet |
| `lock.js` | Lockout countdown script |
| `login.html` | Login form |
| `index.html`, `Welcome.html`, `panel.html` | Pages shown to logged-in users |
| `settings.html` | Admin user management (uses the `{Rows}`, `{CurUser}`, `{SettingsMsg}`, `{AdminTok}` tags) |
| `logout.html` | Shown after logout |
| `loggedon.html` | This account already has a live session |
| `locked.html` | This account is locked |
| `globallocked.html` | The whole server is locked |
| `busy.html` | All session slots in use |
| `denied.html` | Wrong user name or password |
| `forbidden.html` | Logged in but not an admin |

**Not included:** `favicon.jpg`. The server requests it, so supply your own or ignore the console message.
`users.dat` is created automatically on first run.



All the project files are attached and if anyone is running a WebMite and would like to access the Server from outside the local network, this should be a good login security help.

Try it out and let me know your thoughts, or any bugs that might pop up.

MMbasic_login_project.zip
John
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026