Sjs/fix exploit

fix two issues

1. if you uploaded an image at a strange dimension the chat window could be huge
2. provide a very simple and basic rate limit