Index: app/Http/Middleware/Authenticate.php
===================================================================
--- app/Http/Middleware/Authenticate.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ app/Http/Middleware/Authenticate.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -16,5 +16,5 @@
     {
         if (! $request->expectsJson()) {
-            return route('login');
+            return route('auth.loginShow');
         }
     }
Index: app/Http/Middleware/CheckCreatePassword.php
===================================================================
--- app/Http/Middleware/CheckCreatePassword.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ app/Http/Middleware/CheckCreatePassword.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,37 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Closure;
+use App\Models\User;
+use Illuminate\Support\Carbon;
+
+class CheckCreatePassword
+{
+    /**
+     * Handle an incoming request.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \Closure  $next
+     * @return mixed
+     */
+    public function handle($request, Closure $next)
+    {
+        $id = $request->route("id");
+        $token = $request->route("token");
+
+        $user = User::findOrFail($id);
+
+        if($user->is_active) {
+            return redirect()->route("auth.loginShow");
+        }
+
+        if(!$user->is_forgot_password) {
+            if(Carbon::now()->greaterThan($user->created_at->addMinutes(10))) {
+                return redirect()->route("auth.loginShow");
+            }
+        }
+
+        return $next($request);
+    }
+}
Index: app/Http/Middleware/CheckForMaintenanceMode.php
===================================================================
--- app/Http/Middleware/CheckForMaintenanceMode.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ app/Http/Middleware/CheckForMaintenanceMode.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
+
+class CheckForMaintenanceMode extends Middleware
+{
+    /**
+     * The URIs that should be reachable while maintenance mode is enabled.
+     *
+     * @var array
+     */
+    protected $except = [
+        //
+    ];
+}
Index: app/Http/Middleware/CheckIsActive.php
===================================================================
--- app/Http/Middleware/CheckIsActive.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ app/Http/Middleware/CheckIsActive.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,31 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Closure;
+
+class CheckIsActive
+{
+    /**
+     * Handle an incoming request.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \Closure  $next
+     * @return mixed
+     */
+    public function handle($request, Closure $next)
+    {
+        if(!auth()->user()->is_active) {
+
+            $user = auth()->user();
+            $user->is_online = false;
+            $user->save();
+
+            auth()->logout();
+
+            return redirect()->route("auth.loginShow");
+        }
+
+        return $next($request);
+    }
+}
Index: app/Http/Middleware/CheckPermission.php
===================================================================
--- app/Http/Middleware/CheckPermission.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ app/Http/Middleware/CheckPermission.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,26 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Closure;
+
+class CheckPermission
+{
+    /**
+     * Handle an incoming request.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \Closure  $next
+     * @return mixed
+     */
+    public function handle($request, Closure $next, $permission)
+    {
+        $user = auth()->user();
+
+        if($user->hasPermission($permission)) {
+            return $next($request);
+        }
+
+        return abort(403);
+    }
+}
Index: app/Http/Middleware/CheckVerifyNewEmail.php
===================================================================
--- app/Http/Middleware/CheckVerifyNewEmail.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ app/Http/Middleware/CheckVerifyNewEmail.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Closure;
+use App\Models\User;
+
+class CheckVerifyNewEmail
+{
+    /**
+     * Handle an incoming request.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \Closure  $next
+     * @return mixed
+     */
+    public function handle($request, Closure $next)
+    {
+        $id = $request->route("id");
+        $token = $request->route("token");
+
+        $user = User::findOrFail($id);
+
+        if($user->is_active) {
+            return redirect()->route("auth.loginShow");
+        }
+
+        return $next($request);
+    }
+}
Index: app/Http/Middleware/TrimStrings.php
===================================================================
--- app/Http/Middleware/TrimStrings.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ app/Http/Middleware/TrimStrings.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -13,5 +13,4 @@
      */
     protected $except = [
-        'current_password',
         'password',
         'password_confirmation',
Index: app/Http/Middleware/TrustHosts.php
===================================================================
--- app/Http/Middleware/TrustHosts.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ app/Http/Middleware/TrustHosts.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -4,4 +4,5 @@
 
 use Illuminate\Http\Middleware\TrustHosts as Middleware;
+use Illuminate\Http\Request;
 
 class TrustHosts extends Middleware
Index: app/Http/Middleware/VerifyCsrfToken.php
===================================================================
--- app/Http/Middleware/VerifyCsrfToken.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ app/Http/Middleware/VerifyCsrfToken.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -8,4 +8,11 @@
 {
     /**
+     * Indicates whether the XSRF-TOKEN cookie should be set on the response.
+     *
+     * @var bool
+     */
+    protected $addHttpCookie = true;
+
+    /**
      * The URIs that should be excluded from CSRF verification.
      *
