title: Laravel login system
body: <p>I'm doing an app using Laravel, and I'm doing a login system.
  In login I don't have any problem, but in logout the browser gets an error</p>
  
  <pre><code>Whoops, looks like something went wrong.
  </code></pre>
  
  <p>My login function</p>
  
  <pre><code>public function postSignin() {
      if (Auth::attempt(array('email'=&gt;Input::get('email'), 'password'=&gt;Input::get('password')))) {
          return Redirect::to('users/dashboard')-&gt;with('message', 'You are now logged in!');
      } else {
          return Redirect::to('users/login')
              -&gt;with('message', 'Your username/password combination was incorrect')
              -&gt;withInput();
      }
  }
  </code></pre>
  
  <p>My logout function</p>
  
  <pre><code>public function getLogout() {
      Auth::logout();
      return Redirect::to('users/login')-&gt;with('message', 'Your are now logged out!');
  }
  </code></pre>
  
  <p>If I remove the line <code>Auth::logout();</code> the page is redirected but I can't use the <code>Auth::check()</code> to verify the if the user is logged in.</p>
  
  <p>After having the error <code>Whoops, looks like something went wrong.</code> if I refresh the page the redirect is done properly.</p>
  
  <p>Any clue what the problem is?</p>
  
  <p><strong>Edited:</strong></p>
  
  <p>The error is just that</p>
  
  <p><img src="https://i.stack.imgur.com/ZowKH.png" alt="enter image description here"></p>