chore(tests): Add unit tests for persistent login service

This also adds some undocumented properties on the service in order to
inject test mocks for things like get_user.