a better implementation of authentication.