- flash[:error] = t("users.auth_failure.#{params[:message]}")
- redirect_to params[:origin] || login_url
+ flash[:error] = t(params[:message], :scope => "users.auth_failure", :default => t("users.auth_failure.unknown_error"))
+
+ origin = safe_referer(params[:origin]) if params[:origin]
+
+ redirect_to origin || login_url