Fix broken core, more work on authentication