SSH into the UniFi. Note that the UniFi username and password get updated from the controller. Refer to here to find username and password.
ssh ubnt@192.168.1.20
run the syswrapper.sh script with the restore-default option
syswrapper.sh restore-default
Once the device is reset, log in over ssh and reconfigure.
Note that the username and password will now be ubnt/ubnt