I'm using a custom MembershipProvider in my application, and it's all wired up correctly. The only missing piece is the ability to display custom error messages depending on the result of the authentication.
The ValidateUser() method only returns true or false, but I would like to also return a more detailed message in case the validation fails. At the moment I'm using a Session variable to store it, and then read that variable in the login page.
Is there a better way of doing it?