missing endif template tag error corrected
unnecessary imports deleted
unnecessary imports line deleted. Login url deleted in login required decorator. Cause login url added settings.py file