Move channel acquisition closer to use.
Add mocked log in.