Enforce order in profile.js

This forces a user to be posted before data can be posted to that user, preventing race conditions when accessing the API endpoints of the server.