POST request for sending message
Added momentjs library for message time
get request when page loads to see if the user is logged in