Rearrange component dependencies to allow db access from the login server hander