[unstable] implement authentication