Add user and auth code and tests