-Added chat history naviagation

-Moved chatting into functions.js
-Modified chat box style