Added constants for alert codes
Added authentication in UI

Plus a few fixes here and there