Continued work on user profile.
Merge Jiexi's changes with my database query changes.