Add actual login handler

together with tests. Supports both users and daemons, creates new
daemons when such show up, sets them as unknown, awaiting approval