added messages controller and ajax
added user authentication