Index: app/Http/Controllers/Auth/CreatePasswordController.php
===================================================================
--- app/Http/Controllers/Auth/CreatePasswordController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
+++ app/Http/Controllers/Auth/CreatePasswordController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
@@ -0,0 +1,40 @@
+<?php
+
+namespace App\Http\Controllers\Auth;
+
+use App\Http\Requests\Auth\CreatePasswordRequest;
+use App\Models\User;
+use App\Http\Controllers\Controller;
+
+class CreatePasswordController extends Controller
+{
+    public function __construct()
+    {
+        $this->middleware("createPassword");
+    }
+
+    public function showCreatePassword($id, $token)
+    {
+        return view("auth.create_password")->with([
+            "id" => $id,
+            "token" => $token
+        ]);
+    }
+
+    public function createPassword(CreatePasswordRequest $request, $id, $token)
+    {
+        $user = User::find($id);
+
+        $user->password = bcrypt($request->password);
+        $user->is_active = true;
+        $user->is_confirmed = true;
+
+        if ($user->is_forgot_password) {
+            $user->is_forgot_password = false;
+        }
+
+        $user->save();
+
+        return redirect()->route("auth.loginShow");
+    }
+}
Index: app/Http/Controllers/Auth/ForgotPasswordController.php
===================================================================
--- app/Http/Controllers/Auth/ForgotPasswordController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
+++ app/Http/Controllers/Auth/ForgotPasswordController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
@@ -0,0 +1,39 @@
+<?php
+
+namespace App\Http\Controllers\Auth;
+
+use App\Http\Requests\Auth\ForgotPasswordRequest;
+use App\Models\User;
+use App\Http\Controllers\Controller;
+use App\Notifications\ForgotPassword;
+
+class ForgotPasswordController extends Controller
+{
+    public function __construct()
+    {
+        $this->middleware("guest");
+    }
+
+    public function showForgotPassword()
+    {
+        return view("auth.forgot");
+    }
+
+    public function forgotPassword(ForgotPasswordRequest $request)
+    {
+        $user = User::where("email", $request->email)->first();
+
+        $user->is_forgot_password = true;
+        $user->is_active = false;
+        $user->security_code = $user->generateSecurityCode();
+        $user->verify_token = $user->generateVerifyToken();
+
+        $user->save();
+
+        $user->notify(new ForgotPassword($user));
+
+        $request->session()->flash("forgotInfo", "We have sent an email to your inbox.");
+
+        return redirect()->route("auth.forgotShow");
+    }
+}
Index: app/Http/Controllers/Auth/LoginController.php
===================================================================
--- app/Http/Controllers/Auth/LoginController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
+++ app/Http/Controllers/Auth/LoginController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
@@ -0,0 +1,69 @@
+<?php
+
+namespace App\Http\Controllers\Auth;
+
+use App\Http\Requests\Auth\LoginRequest;
+use App\Models\User;
+use App\Http\Controllers\Controller;
+use Illuminate\Support\Facades\Hash;
+
+class LoginController extends Controller
+{
+    protected $redirectTo = '/dashboard';
+
+    public function __construct()
+    {
+        $this->middleware("guest")->except('logout');
+    }
+
+    public function showLogin()
+    {
+        return view("auth.login");
+    }
+
+    public function login(LoginRequest $request)
+    {
+        $user = User::whereUsername($request->username)->first();
+
+        if (!$user->is_active) {
+            $request->session()->flash("isActiveError", "Your account is blocked or its not confirmed yet. Please contact with your system administrator or check your email.");
+            return redirect()->back();
+        }
+
+        if (!Hash::check($request->password, $user->password)) {
+            $request->session()->flash("passwordError", "Your password is incorrect");
+            return redirect()->back()->withInput($request->input());
+        }
+
+        if (auth()->attempt([
+            "username" => $request->username,
+            "password" => $request->password,
+            "is_active" => true], $request->remember)) {
+
+            $user->is_online = true;
+            $user->save();
+
+            return redirect()->intended('/dashboard');
+        }
+
+        if ($user->is_forgot_password) {
+            $user->is_forgot_password = false;
+        }
+
+        $request->session()->flash("loginError", "An error occurred while login. Please try again later.");
+
+        return redirect()->back()->withInput($request->input());
+    }
+
+    public function logout()
+    {
+
+        $user = auth()->user();
+        $user->is_online = false;
+        $user->save();
+
+        auth()->logout();
+
+        return redirect("/auth/login");
+    }
+}
Index: app/Http/Controllers/Auth/VerifyNewEmailController.php
===================================================================
--- app/Http/Controllers/Auth/VerifyNewEmailController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
+++ app/Http/Controllers/Auth/VerifyNewEmailController.php	(revision 7304c7f4e9d471fa8974c193daec4fdd86dabe58)
@@ -0,0 +1,32 @@
+<?php
+
+namespace App\Http\Controllers\Auth;
+
+use App\Http\Requests\Auth\VerifyNewEmailRequest;
+use App\Models\User;
+use App\Http\Controllers\Controller;
+
+class VerifyNewEmailController extends Controller
+{
+    public function __construct()
+    {
+        $this->middleware("checkVerifyNewEmail");
+    }
+
+    public function create($id, $token)
+    {
+        return view("auth.verify")->with([
+            "id" => $id,
+            "token" => $token
+        ]);
+    }
+
+    public function verify(VerifyNewEmailRequest $request, $id, $token)
+    {
+        $user = User::find($id);
+        $user->is_active = true;
+        $user->save();
+
+        return redirect()->route("auth.login");
+    }
+}
