Move the login code out into passcode_controller.
/gists and /gists/all should *basically* do the same thing.