title: laravel 4.2 How to check whether any user is logged in multi auth
body: <p>I am using multiauth with two tables admin_profile and company in Laravel 4.2.</p>
  
  <pre><code>public function Login()
  {
      $LoginData = Input::except(array('_token'));
      //return $LoginData;
     if (Input::get('username')=='' || Input::get('password')=='') 
     {
       if(!$LoginData['CompanyURL']=='')
          return Redirect::to('')-&gt;withInput()-&gt;with('Message', 'Enter Username and Password'); 
      else
          return Redirect::to('company/'.$LoginData['CompanyURL'])-&gt;withInput()-&gt;with('Message', 'Enter Username and Password'); 
     }
      //Admin User
      if($LoginData['CompanyURL']=='')
      {
         if (Auth::admin()-&gt;attempt(array_filter($LoginData)))
         {    
              $UserDetails = User::where('username', Input::get('username'))-&gt;first();
  
              if(count($UserDetails)&gt;0)
                  return Redirect::intended('home');      
  
         }
         else
          return Redirect::to('')-&gt;withInput()-&gt;with('Message', 'UserName or Password Invalid');
      }
      else
      {
          if (Auth::user()-&gt;attempt($LoginData))
          {   
              //return $LoginData;
              $CompanyModel = User::where('username', Input::get('username'))-&gt;first();
  
              return Redirect::intended('company/'.$LoginData['CompanyURL'].'/home');
          }
          return Redirect::to('company/'.$LoginData['CompanyURL'])-&gt;withInput()-&gt;with('Message', 'UserName or Password Invalid');
      }
  }
  </code></pre>
  
  <p>But i cannot check whether any user of type admin or company is logged in to open the pages like home page which needs user authentication</p>
  
  <p>How to change this
      Route::group(array('before' => 'auth'), function()
      {
          Some routes....
      }</p>