title: Why the filter does not work when the back button of the browser is pressed in laravel?
body: <p>I have a view to enter an account, then called the controller where the data is validated and are then saved with the method of authentication</p>
  
  <pre><code>    public function doLogin(){
      $rules = array(
                      'email' =&gt; 'required|email',
                      'password' =&gt; 'required'
                      );
  
      $validator = Validator::make(Input::all(), $rules);
      //dd(Input::all());
  
      if($validator-&gt;fails()){
          return Redirect::to('usuarios')-&gt;withErrors($validator)-&gt;withInput(Input::except('password'));
      }else{
  
          $userdata = array(
              'email' =&gt; Input::get('email'),
              'password' =&gt; Input::get('password')
              );
  
          if(Auth::attempt($userdata)){
              return View::make('principal');
          }else{
  
              return Redirect::to('usuarios');
          }
  
      }
  }
  </code></pre>
  
  <p>I also have the function to exit the session</p>
  
  <pre><code>Route::get('usuarios/logout', function(){
          Auth::logout();
          return Redirect::to('usuarios'); //login page
  })-&gt;before('auth');
  </code></pre>
  
  <p>The problem is that when I press the back button of the browser, I can use without problems the application but without the authentication.</p>
  
  <p><strong>Route</strong></p>
  
  <pre><code>Route::get('usuarios', function(){
  return View::make('login');
  })-&gt;before('guest');
  
  Route::get('usuarios/view', function(){
      $usuarios = Usuario::paginate(5);
      return View::make('viewusuario', array('usuarios' =&gt; $usuarios));
  })-&gt;before('auth');
  
  Route::get('usuario/create', function(){
      return View::make('formusuario');
  })-&gt;before('auth');
  </code></pre>
  
  <p><strong>Filter</strong></p>
  
  <pre><code>Route::filter('auth', function()
  {
      if (Auth::guest()) return Redirect::guest('usuarios'); //login page
  });
  Route::filter('guest', function()
  {
      if (Auth::check()){
          return View::make('principal'); //home page     
      }
  });
  </code></pre>
  
  <p>How can I fix it?</p>