require users to visit /hub/home and click 'Start My Server' to get a new server
Visits to /hub/user/:name will get an error if the previous spawn failed,
rather than triggering a new spawn.
This should guarantee that a user sees an error if their spawn failed,
regardless of when the failure occurred and how long it took.
Some cases of slow errors could result in triggering a new spawn indefinitely without
the user seeing an error message.
/hub/spawn was a simple redirect to /user/:name in the absence of a spawn form,
but now clears the `_spawn_future` prior to redirect
to signal that a new spawn has been explicitly requested in the case of a prior failure.
it was made a method for handing named_servers,
but that made things way more complicated and replaced a boolean flag with a callable,
which would behave unexpectedly but without error if a boolean flag was expected.
Spawners have properties for dealing with this now, so use spawners
Restore `user.running` as an alias for `user.spawner.ready`
Simplifies login URL, handler login
- all login redirects go to `settings['login_url']`
- `login_url` is unconditionally `/hub/login`
- `/hub/login` renders form page or 'login with...' button
- enabling auto_login redirects from /hub/login to Authenticator.login_url()
/hub/login always renders a page,
whereas `authenticator.login_url` may automatically log the user in via redirects,
causing logout to appear not to work, as redirects immediately cause login again.
should avoid needing to cram user-detection / intent into other endpoints.
That functionality isn't removed,
but warnings are added indicating that /user-redirect/ should be used instead.
call poll_and_notify to ensure triggering of dead-server events in a few places:
- `/hub/home` page view
- user start and stop API endpoints
This should avoid the failure to stop a server that's died uncleanly because the server hasn't noticed yet
relies on CHP's host-based routing (a feature I didn't add!)
requires wildcard DNS and wildcard SSL for a proper setup
still lots to workout and cleanup in terms of cookies and where to use host, domain, path, but it works locally.
If Spawner.options_form is specified, a form providing input controls is shown to the user prior to launch.
Spawners access the result via the `self.user_options` dict.
The default spawners offer no form.
optionally allow admin users to login to user servers by visiting a special admin-only URL that sets the relevant cookie
- disabled by default
- an 'access server' button is added to the admin panel, which sets the necessary cookie to log in to the user server
- index no longer requires login, it's just a big fat login button
- home has stop, start, admin buttons
- admin doesn't do anything yet
- add jhapi javascript client for REST API