Users can create profiles for themselves.

Much of this was created previously and added on other commits.
Style changes and database query fix