renamed templates/error.html to templates/show_msg.html and made changes accordingly in views/user.
{% extends 'base.html' %}
{% block content %}
{% if error_msg %}
{{ error_msg }}<br />
{% endif %}
<form action="" method="post">
{{form.as_p}}
<input type="submit" value="Submit">
</form>
{% endblock %}