Remove outdated code in saveImage()
Refactor registration logic for backend
Fix premature JSON encoding for credentials
Add JSON validation function to Sugar
Present flash on register form