title: User Authentication in laravel
body: <p>I have a question about the built in user authentication functionality in laravel. 
  I got the authentication part to work but it doesn't seem like a user is stored in the session.</p>
  
  <pre><code>Route::get('login', function(){
      $username = 'stardriver'; 
      $password = '1234'; 
  
  
      $creds = array('username' =&gt; $username, 'password' =&gt; $password);
      if(Auth::attempt($creds)){ //I assume that its already logged in when it goes here
  
          return Auth::guest(); //but why does this return 1?
      }else{
          return 'nope wrong creds'; //if I change the username or password declared above, it goes here
      }
  
  
  });
  </code></pre>
  
  <p>Here's my admin page. I get an infinite loop when I redirect to this page after the user has successfully authenticated.</p>
  
  <pre><code>Route::get('admin', array('before' =&gt; 'auth', 'do' =&gt; function(){
  
      return "you are logged in! " . HTML::link('logout', 'logout dude');
  }));
  </code></pre>
  
  <p>What do you think is wrong here?</p>