Debugged code for Devise alerts.