title: Redirect User to Signup
body: <p>Using <code>before_action :authenticate_user!</code> to check if user logged in. But it sends users to <code>login</code> instead of <code>signup</code>.</p>
  
  <p>Tried different ways of directing user to <code>signup</code> instead of <code>login</code>, but they do not <strong>send the user back to the original page after successful signup</strong>. </p>
  
  <p>How can I send a user to signup and direct a user back to the original page afterwards? </p>
  
  <p>Attempts:</p>
  
  <pre><code>before_filter :auth_user
  
  def auth_user
    redirect_to new_user_registration_url unless user_signed_in?
  end
  </code></pre>
  
  <h3>Routes File</h3>
  
  <pre><code>Rails.application.routes.draw do
    devise_for :installs
    resources :orders
    resources :products
    devise_for :users
  
    get 'dashboard' =&gt; 'pages#dashboard'
    get 'contact' =&gt; 'pages#contact'
    get 'cart' =&gt; 'carts#index'
  
    root 'pages#home'
  </code></pre>