Laravel 5.4认证

I've got questions and problems: First here is my code:

AuthMiddleware.php

public function handle($request, Closure $next)
{
    if (auth()->check()) {
        return $next($request);
    } else {
        if (auth()->viaRemember()) {
            return $next($request);
        }
    }


    return redirect()->route('auth.index');

}

AuthController.php

if (auth()->attempt(compact('email', 'password'), true)) {

        return redirect()->route('dashboard');
}

Kernel.php

protected $routeMiddleware = [
    'auth.check'       => \App\Http\Middleware\AuthMiddleware::class,
 ]

routes.php

 Route::group(['prefix' => 'auth'], function () {
    Route::get('/', 'AuthController@index')->name('auth.index');
    Route::post('login', 'AuthController@login');
});

Route::group(['middleware' => 'auth.check'], function () {
    Route::get('dashboard', function () {
        return view('front.welcome');
    })->name('dashboard');
});

Here is the problem:

  1. Every time I close my browser (with expire_on_close:true on session file) the page will redirect me to /login instead of /auth. I can't find the code why it redirect me to /login. Any solution?

  2. I want to apply rememberMe function. But every time I close my browser it always log me out. I've tried set expire_on_close:false. Yes, it's working but everytime I run auth()->viaRemember() it always return me false. Any suggestion?

My Session using file.

1- Check app/Exceptions/Handler.php That's where the redirect to login is. Function name is unauthenticated();

protected function unauthenticated($request, AuthenticationException $exception)
{
    if ($request->expectsJson()) {
        return response()->json(['error' => 'Unauthenticated.'], 401);
    }

    return redirect()->guest('login'); //HERE
}

2- When you remember, just doing Auth::check() or Auth::viaRemember() should work when the user comes back to the website.