serializing user profile to db