Experiments with chaining dependent ops w/o controller.

Seems to work! Will refactor and append.
Added unit tests for token request, login attempt and file name check.

Less atomic than desired because of async nature of the operations, but better than no unit testing.