Factor out DB work out of UserProfile to separate UI from backend

Change-Id: Ieb2c1482ae86e3f781f3655fec172130f1b1f3cd
Merge "Factor out DB work out of UserProfile to separate UI from backend"