Draft implementation of authentication.