import json to makje compatobe 1.6
eliminated django.middleware.transaction.TransactionMiddleware for django1.6 compatibility
User model subtituted for settings.AUTH_USER_MODEL for extending possibility
styling for messages