Explain the purpose of Django signals in the context of authentication