I have provided a simple login functionality. For logout, I tried to use the built-in one. This is my urls.py:
(r\'\', include(\'django.contrib.auth.urls\'))
Go to settings.py and add this code. "/" will redirect you to home
# Where to redirect during authentication
LOGIN_REDIRECT_URL = "/" #To go to home after login instead of getting redirected to accounts/profile on login which is default
LOGOUT_REDIRECT_URL = "/" #To logout back to the home page instead of the default admin logout page