Refactored so that the User companion object requires a connection instead of relying on there being a Play application available.