Implement polling for uploads

This basically makes the whole upload mechanic completely done on the home page.
Implement media flags
Add uploaded files to user history