Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/login/login.component.html
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/login/login.component.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/login/login.component.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,51 @@
+<!--
+  This example requires some changes to your config:
+
+  ```
+  // tailwind.config.js
+  module.exports = {
+    // ...
+    plugins: [
+      // ...
+      require('@tailwindcss/forms'),
+    ],
+  }
+  ```
+-->
+<!--
+  This example requires updating your template:
+
+  ```
+  <html class="h-full bg-white">
+  <body class="h-full">
+  ```
+-->
+<div class="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
+  <div class="sm:mx-auto sm:w-full sm:max-w-sm">
+    <img class="mx-auto h-10 w-auto" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600" alt="Your Company">
+    <h2 class="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900">Sign in to your account</h2>
+  </div>
+
+  <div class="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
+    <form [formGroup]="form" class="space-y-6" (ngSubmit)="onSubmit($event)">
+      <mat-form-field appearance="outline">
+        <label>Email</label>
+        <input matInput formControlName="email" placeholder="john.doe@example.com">
+      </mat-form-field>
+
+      <mat-form-field appearance="outline">
+        <label>Password</label>
+        <input  matInput [type]="'password'" formControlName="password">
+      </mat-form-field>
+
+      <div>
+        <input [disabled]="form.invalid || form.pristine" value="Sign in" type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
+      </div>
+    </form>
+
+    <p class="mt-10 text-center text-sm text-gray-500">
+      Not a member?
+      <a [routerLink]="['/register']" class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500">Register now!</a>
+    </p>
+  </div>
+</div>
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/login/login.component.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/login/login.component.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/login/login.component.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,56 @@
+import { Component } from '@angular/core';
+import {
+  FormControl,
+  FormGroupDirective,
+  NgForm,
+  Validators,
+  FormsModule,
+  ReactiveFormsModule, FormGroup,
+} from '@angular/forms';
+import {MatInputModule} from '@angular/material/input';
+import {MatFormFieldModule} from '@angular/material/form-field';
+import {ErrorStateMatcher} from "@angular/material/core";
+import {Router, RouterLink} from "@angular/router";
+import {InputFieldComponent} from "../input-field/input-field.component";
+import {AuthService} from "../../services/auth/auth.service";
+import {AuthRequest} from "../../model/requests/AuthRequest";
+import {tap} from "rxjs";
+@Component({
+  standalone: true,
+  imports: [FormsModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, RouterLink, InputFieldComponent],
+  templateUrl: './login.component.html',
+})
+export class LoginComponent {
+
+  form: FormGroup = new FormGroup({
+    email: new FormControl('', [Validators.required, Validators.email]),
+    password: new FormControl('', [Validators.required]),
+  })
+
+  constructor(
+    private router: Router,
+    private service: AuthService
+  ) {
+  }
+
+  onSubmit($event: Event) {
+    console.log(this.form.value as AuthRequest)
+      this.service.login(this.form.value as AuthRequest)
+        .pipe(
+          tap(result => {
+            console.log(result)
+            sessionStorage.setItem('jwt', result.token);
+            this.service.refreshAuth$.next(true);
+          })
+        )
+        .subscribe({
+        next: result => {
+          this.router.navigate(['/'])
+        },
+        error: error => {
+          sessionStorage.removeItem('jwt');
+        }
+      })
+  }
+}
+
