Save state in url, enable navigation using forward/back buttons
Check HTTP Origin header
Better logic for fetching old messages