protected function redirectTo($request)
    {
        session()->put('loginRedir', $_SERVER["REQUEST_URI"]);
        session()->put('loginRedirTime', time());
        if (!$request->expectsJson()) {
            return route('login');
        }
    }