Created a sendMessage ajax method to accomodate handling errors and success
Added an array of messages and autoupdate on change of messages e.g. receiving a new chat message
Fixed the updating of the chatbox
Fixed the double entry when sending message with ng-click