public function authenticateUser(){
$userdata = array(
'login1' => Input::get('login'),
'password1' => Input::get('password')
);
if( Auth::attempt($userdata) ) {
return Redirect::to('/admin');
} else {
return View::make('auth.loginform', array(
'error' => 'user data is incorrect',
'old_input' => Input::all()
));
}
}