public function doLogin(Request $request)
    {
        $userdata = array(
            'email'     =>  $request->email,
            'password'  =>  $request->password
        );
        
        if(\Auth::attempt($userdata, true, true))
        {
            if(config('entrance.activated')) {
                if(\Auth::user()->status != 1) {
                    // Logging the user out
                    \Auth::logout();

                    $request->session()->flash('message', 'Dit account is staat niet op active');
                    return redirect()->route('login.index');
                }
            }
            $request->session()->flash('message', 'Ingelogd');
            return redirect()->intended();
        }
        else
        {
            $request->session()->flash('message', 'E-mail of wachtwoord onjuist!');
            return redirect()->route('login.index')->withInput();
        }
    }