add password reset, flash messages, and error handling