I recently started learning Django framework. While learning I made a sample app - user authentication system. This is the code for the same. This app basically:
- creates a user
- saves it in the database
- uses it while the user is logging in
- displays error message if the user with the same username already exists
- goes to homepage if the login was successful