change the way messages are displayed
still workign on error messages
now it shows error and success messages
better error messages