Updated register.py to ony reload ui when in development mode