Update main.js

Added a post2ajax function.. signup form etc can post directly to ajax, without refresh etc.. and have a nice loading etc.