Add some css styles for error and success messages.
Fix some bugs on server-side and client-side scripts.