Refs #6 - Remove login-specific code.

Rearrange setup code.