Refactor code base to separate out parts in the service.

Separate Core and Auth.
Implement a login.

Signed-off-by: Geoff Lane <geoff@zorched.net>