added logic to pages
added in javascript for messages + jackson dependecy for ajax
error handling