Index: frontend/src/App.js
===================================================================
--- frontend/src/App.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/App.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -6,5 +6,5 @@
 import {Spin} from "antd";
 import React, {useEffect, useState} from "react";
-import {Login, Register} from "./auth";
+import {Login, Register} from "./Auth/auth";
 import Dashboard from "./Dashboard";
 import Reservations from "./Dashboard/Reservations";
@@ -13,9 +13,13 @@
 import Menu from "./Dashboard/Menu";
 import Review from "./Dashboard/Review";
+import Confirm from "./Auth/Confirm";
+import SendConfirm from "./Auth/SendConfirm";
+import SendReset from "./Auth/SendReset";
+import Reset from "./Auth/Reset";
 
 
 function App() {
   const [user, setUser] = useState(undefined)
-  const [loading, setLoading] = useState(false)
+  const [loading, setLoading] = useState(true)
   useEffect(()=>{
     getUser()
@@ -24,6 +28,6 @@
   const getUser = () => {
     setLoading(true)
-    axios.get(env.api+'Users/authed',{headers:{Authorization:sessionStorage.getItem('Auth')}}).then(res=>{
-      console.log(!res.data)
+    axios.get(env.api+'Users/authed',{headers:{Authorization:localStorage.getItem('Auth')}}).then(res=>{
+      console.log(res.data)
       setUser(res.data)
       setLoading(false)
@@ -32,5 +36,5 @@
   const logout = () => {
     setUser(undefined);
-    sessionStorage.removeItem('Auth');
+    localStorage.removeItem('Auth');
     window.location.replace('/')
   }
@@ -48,4 +52,8 @@
             <Route path="/login" element={loading ? <Spin /> :  !user ? <Login setUser={setUser}/> :  <Navigate to="/dashboard" replace={true} />}/>
             <Route path="/register" element={loading ? <Spin /> :  !user ? <Register setUser={setUser}/> :  <Navigate to="/dashboard" replace={true} />}/>
+            <Route path="/reset-password" element={loading ? <Spin /> : <SendReset/>}/>
+            <Route path="/reset" element={loading ? <Spin /> : <Reset/>}/>
+            <Route path="/confirm" element={loading ? <Spin /> : <Confirm setUser={setUser} user={user}/>}/>
+            <Route path="/confirm-email" element={loading ? <Spin /> : <SendConfirm setUser={setUser} user={user}/>}/>
             <Route path="/" element={<FrontPage user={user} logout={logout}/>}/>
           </Routes>
Index: frontend/src/Auth/Confirm.js
===================================================================
--- frontend/src/Auth/Confirm.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ frontend/src/Auth/Confirm.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,47 @@
+import React, {useEffect, useState} from 'react'
+import {Header} from "../Header";
+import {Modal, notification, Spin} from "antd";
+import {useLocation} from "react-router";
+import {useNavigate, useSearchParams} from "react-router-dom";
+import axios from "axios";
+import env from "../env";
+
+const Confirm = ({setUser, user}) => {
+
+    const history = useNavigate()
+    const [result, setResult] = useState("")
+    const [searchParams, setSearchParams] = useSearchParams();
+
+    useEffect(()=>{
+        const param = searchParams.get("id");
+        if(param==null){
+            setResult("Invalid key");
+            return;
+        }
+        axios.post(env.api+"Users/confirmed?validityString="+param,{},{headers:{Authorization:localStorage.getItem('Auth')}}).then(el => {
+            setResult("Успешно потврдена емаил адреса. Ќе бидете редиректирани за 3 секунди")
+            setUser(user => {return {...user,isConfirmed: true}})
+            setTimeout(()=>{
+                history('/login')
+            },3000)
+        }).catch(er=>{
+            if(er.response.data.includes("Invalid check")){
+                setResult("Невалиден линк")
+            }
+            if(er.response.data.includes("Link expired")){
+                setResult("Линкот е стар. Ве молиме обновете го.")
+            }
+        });
+
+    },[])
+
+    return (
+        <div>
+            <Header/>
+            <div style={{textAlign:'center',margin:'50px'}}>
+                {result == "" ? <Spin/> : <h2>{result}</h2>}
+            </div>
+        </div>
+    )
+}
+export default Confirm;
Index: frontend/src/Auth/Reset.js
===================================================================
--- frontend/src/Auth/Reset.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ frontend/src/Auth/Reset.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,82 @@
+import React, {useEffect, useState} from 'react';
+import {Header} from "../Header";
+import {Button, Form, Input, Modal, notification, Spin} from "antd";
+import axios from "axios";
+import '../App.css'
+import env from "../env";
+import {useNavigate, useSearchParams} from "react-router-dom";
+
+const Reset = () => {
+
+    const [loading, setLoading] = useState(false);
+    const [searchParams, setSearchParams] = useSearchParams();
+
+    const history = useNavigate()
+    const resetPassword = (data) => {
+        setLoading(true)
+        const param = searchParams.get("id");
+        if(param==null){
+            Modal.error({
+                title: 'Невалиден линк',
+            });
+            return;
+        }
+        axios.post(env.api+"Users/reseted",{}, {
+            params: {
+                validityString: param,
+                newPassword: data.password
+            }}).then(el => {
+            setLoading(false)
+            Modal.success({
+                title: 'Успешно потврдена сменета лозинка. Ќе бидете редиректирани за 3 секунди',
+            });
+            setTimeout(()=>{
+                history('/login')
+            },3000)
+        }).catch(er=>{
+            setLoading(false)
+            if(er.response.data.includes("Invalid check")){
+                Modal.error({
+                    title: 'Невалиден линк',
+                });
+            }
+            if(er.response.data.includes("Link expired")){
+                Modal.error({
+                    title: 'Линкот е стар. Ве молиме обновете го.',
+                });
+            }
+        });
+    }
+
+    return (
+        <div>
+            <div style={{width:'100vw',height:'100vh', textAlign:'center',backgroundColor:'#F2F2F2'}}>
+                <div className='center' style={{backgroundColor:'white',padding:'40px', borderRadius:'20px'}}>
+                    <h1 style={{marginBottom:'40px'}}>Ресетирајте ја вашата лозинка</h1>
+                    <Form onFinish={resetPassword}
+                          onFinishFailed={() => Modal.error({title: "Ве молиме пополнете ги задолжителните полиња"})}>
+                        <Form.Item
+                            label="Нова лозинка"
+                            name="password"
+                            rules={[
+                                {
+                                    required: true,
+                                    message: 'Ве молиме внесете ја новата лозинка!',
+                                },
+                            ]}
+                        >
+                            <Input type={'password'}/>
+                        </Form.Item>
+                        <Form.Item>
+                            <Button type="primary" htmlType="submit" loading={loading}>
+                                Прати
+                            </Button>
+                        </Form.Item>
+                    </Form>
+                </div>
+            </div>
+        </div>
+    )
+}
+
+export default Reset;
Index: frontend/src/Auth/SendConfirm.js
===================================================================
--- frontend/src/Auth/SendConfirm.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ frontend/src/Auth/SendConfirm.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,46 @@
+import React, {useEffect} from 'react';
+import {Header} from "../Header";
+import {Button, Spin} from "antd";
+import axios from "axios";
+import env from "../env";
+
+const SendConfirm = ({setUser, user}) => {
+    const logout = () => {
+        localStorage.removeItem('Auth');
+        setUser(false)
+    }
+
+    const sendConfirmationEmail = () => {
+        axios.post(env.api + "Users/confirm", {}, {headers: {Authorization: localStorage.getItem('Auth')}}).then(el => {
+            console.log("sent")
+        }).catch(er => {
+            console.log(er);
+        });
+    }
+    useEffect(()=>{
+        console.log("once")
+        if(user && !user.isConfirmed) {
+            sendConfirmationEmail()
+        }
+    },[])
+
+    return (
+        <div>
+            <Header onClickButton={() => logout()} buttonText={'Одјави се'}/>
+            {!user.isConfirmed ?
+                <div style={{textAlign:'center',margin:'50px'}}>
+                    <h2>За да го користите овој вебсајт потребно е да го потврдите вашиот профил. Мејл за потврда на вашиот профил е пратен на вашата емаил адреса.</h2>
+                    <Button type='primary' onClick={sendConfirmationEmail}>
+                        Прати повторно
+                    </Button>
+                </div>
+                :
+                <div style={{textAlign:'center',margin:'50px'}}>
+                    <h2>Вашиот емаил е веќе потврден.</h2>
+                </div>
+            }
+        </div>
+    )
+}
+
+export default SendConfirm;
Index: frontend/src/Auth/SendReset.js
===================================================================
--- frontend/src/Auth/SendReset.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ frontend/src/Auth/SendReset.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,59 @@
+import React, {useEffect, useState} from 'react';
+import {Header} from "../Header";
+import {Button, Form, Input, Modal, notification, Spin} from "antd";
+import axios from "axios";
+import '../App.css'
+import env from "../env";
+
+const SendReset = () => {
+
+    const [loading, setLoading] = useState(false);
+
+    const sendResetEmail = (data) => {
+        setLoading(true)
+        axios.post(env.api + "Users/reset?email="+data.email, {}).then(el => {
+            setLoading(false);
+            Modal.success({
+                title: 'Инструкции за ресетирање на вашата лозинка се испратени на вашиот мејл',
+            });
+        }).catch(er => {
+            setLoading(false);
+            Modal.error({
+                title: 'Се случи проблем',
+            });
+            console.log(er);
+        });
+    }
+
+    return (
+        <div>
+            <div style={{width:'100vw',height:'100vh', textAlign:'center',backgroundColor:'#F2F2F2'}}>
+                <div className='center' style={{backgroundColor:'white',padding:'40px', borderRadius:'20px'}}>
+                    <h1 style={{marginBottom:'40px'}}>Ресетирајте ја вашата лозинка</h1>
+                    <Form onFinish={sendResetEmail}
+                          onFinishFailed={() => Modal.error({title: "Ве молиме пополнете ги задолжителните полиња"})}>
+                        <Form.Item
+                            label="Емаил"
+                            name="email"
+                            rules={[
+                                {
+                                    required: true,
+                                    message: 'Ве молиме внесете емаил!',
+                                },
+                            ]}
+                        >
+                            <Input/>
+                        </Form.Item>
+                        <Form.Item>
+                            <Button type="primary" htmlType="submit" loading={loading}>
+                                Прати
+                            </Button>
+                        </Form.Item>
+                    </Form>
+                </div>
+            </div>
+        </div>
+    )
+}
+
+export default SendReset;
Index: frontend/src/Auth/auth.js
===================================================================
--- frontend/src/Auth/auth.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ frontend/src/Auth/auth.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,178 @@
+import React, {useState} from 'react'
+import {useNavigate} from "react-router-dom";
+import {Button, Card, Form, Input, Modal, notification} from "antd";
+import { UserOutlined, LockOutlined } from '@ant-design/icons';
+import axios from "axios";
+import '../App.css'
+import env from "../env";
+
+const setAuthCookie = (token) => {
+    localStorage.setItem('Auth','Bearer '+token)
+}
+
+const Login = ({setUser}) => {
+    const history = useNavigate()
+
+    const [loading, setLoading] = useState(false)
+
+    const login = (attr) => {
+        setLoading(true)
+        axios.post(env.api+'Users/login',{email: attr.email, password: attr.password}).then(res => {
+            setAuthCookie(res.data.token)
+            console.log(res.data.token)
+            setUser(res.data)
+            setLoading(false)
+            history(res.data.isAdmin ? '/dashboard' : '/')
+        }).catch(el => {
+            Modal.error({
+                title: 'Погрешен мејл или лозинка',
+            });
+            setLoading(false)
+        })
+    }
+
+    return(
+        <div style={{width:'100vw',height:'100vh', textAlign:'center',backgroundColor:'#F2F2F2'}}>
+            <div className='center'>
+                <Card style={{backgroundColor:'white', width:'100%', borderRadius:'20px'}} className='center'>
+                    <h1>Најави се</h1>
+                    <Form
+                        name="normal_login"
+                        onFinish={res=>login(res)}
+                    >
+                        <Form.Item
+                            name="email"
+                            rules={[
+                                {
+                                    required: true,
+                                    message: 'Внесете мејл',
+                                },
+                                {
+                                    type: 'email',
+                                    message: 'Внесете валиден мејл',
+                                },
+                            ]}
+                        >
+                            <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="Email" />
+                        </Form.Item>
+                        <Form.Item
+                            name="password"
+                            rules={[
+                                {
+                                    required: true,
+                                    message: 'Внесете лозинка!',
+                                }
+                            ]}
+                        >
+                            <Input
+                                prefix={<LockOutlined className="site-form-item-icon" />}
+                                type="password"
+                                placeholder="Password"
+                            />
+                        </Form.Item>
+
+                        <Form.Item style={{margin:'0px'}}>
+                            <Button type="primary" htmlType="submit" className="login-form-button" loading={loading}>
+                                Log in
+                            </Button>
+                            <div>
+                                Или <a href={"/register"}>регистрирај се!</a>
+                            </div>
+                        </Form.Item>
+                    </Form>
+                </Card>
+            </div>
+        </div>
+    )
+}
+
+const Register = ({setUser}) => {
+
+    const [loading, setLoading] = useState(false)
+    const history = useNavigate()
+    const register = (attr) => {
+        if (attr.password !== attr.confirm) {
+            Modal.error({
+                title: 'Лозинките не се исти',
+            });
+            return;
+        }
+        setLoading(true)
+        axios.post(env.api+'Users/register',{email: attr.email, password: attr.password}).then(res => {
+            setAuthCookie(res.data.token)
+            setUser(res.data)
+            setLoading(false)
+            history('/confirm-email')
+        })
+    }
+    return(
+        <div style={{width:'100vw',height:'100vh', textAlign:'center', backgroundColor:'#F2F2F2'}}>
+            <div className='center'>
+                <Card style={{backgroundColor:'white', width:'100%', borderRadius:'20px'}} className='center'>
+                    <h1>Регистрирај се</h1>
+                    <Form
+                        name="normal_login"
+                        onFinish={(attr)=>register(attr)}
+                    >
+                        <Form.Item
+                            name="email"
+                            rules={[
+                                {
+                                    required: true,
+                                    message: 'Внесете мејл',
+                                },
+                                {
+                                    type: 'email',
+                                    message: 'Внесете валиден мејл',
+                                },
+                            ]}
+                        >
+                            <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="Email" />
+                        </Form.Item>
+                        <Form.Item
+                            name="password"
+                            rules={[
+                                {
+                                    required: true,
+                                    message: 'Внесете лозинка!',
+                                },
+                            ]}
+                        >
+                            <Input
+                                prefix={<LockOutlined className="site-form-item-icon" />}
+                                type="password"
+                                placeholder="Password"
+                            />
+                        </Form.Item>
+                        <Form.Item
+                            name="confirm"
+                            rules={[
+                                {
+                                    required: true,
+                                    message: 'Потврдете лозинка!',
+                                },
+                            ]}
+                        >
+                            <Input
+                                prefix={<LockOutlined className="site-form-item-icon" />}
+                                type="password"
+                                placeholder="Confirm password"
+                            />
+                        </Form.Item>
+
+                        <Form.Item style={{margin:'0px'}}>
+                            <Button type="primary" htmlType="submit" className="login-form-button" loading={loading}>
+                                Register
+                            </Button>
+                            <div>
+                                Или <a href={"/login"}>најави се!</a>
+                            </div>
+                        </Form.Item>
+                    </Form>
+                </Card>
+            </div>
+        </div>
+    )
+}
+
+export {Login,Register};
Index: frontend/src/Dashboard.js
===================================================================
--- frontend/src/Dashboard.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/Dashboard.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -11,5 +11,5 @@
     const history = useNavigate()
     const logout = () => {
-        sessionStorage.removeItem('Auth');
+        localStorage.removeItem('Auth');
         setUser(false)
     }
Index: frontend/src/Dashboard/Menu.js
===================================================================
--- frontend/src/Dashboard/Menu.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/Dashboard/Menu.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -25,5 +25,5 @@
     const addMenu = (data) => {
         setLoadingSave(true);
-        axios.post(env.api + 'Menu/',{...data,price: parseInt(data.price)}, { headers: {Authorization: sessionStorage.getItem('Auth')}
+        axios.post(env.api + 'Menu/',{...data,price: parseInt(data.price)}, { headers: {Authorization: localStorage.getItem('Auth')}
         }).then(res => {
             notification['success']({
@@ -42,5 +42,5 @@
 
     const deleteMenu = (id) => {
-        axios.delete(env.api + 'Menu/'+id, {headers: {Authorization: sessionStorage.getItem('Auth')}
+        axios.delete(env.api + 'Menu/'+id, {headers: {Authorization: localStorage.getItem('Auth')}
         }).then(res => {
             notification['success']({
Index: frontend/src/Dashboard/Reservations.js
===================================================================
--- frontend/src/Dashboard/Reservations.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/Dashboard/Reservations.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -26,8 +26,8 @@
                     from: date[0].format('YYYY-MM-DDThh:mm:ss') + 'Z',
                     to: date[1].format('YYYY-MM-DDThh:mm:ss') + 'Z'
-                }, headers: {Authorization: sessionStorage.getItem('Auth')}
+                }, headers: {Authorization: localStorage.getItem('Auth')}
             }).then(res => {
                 axios.get(env.api + 'Reservations/new', {
-                     headers: {Authorization: sessionStorage.getItem('Auth')}
+                     headers: {Authorization: localStorage.getItem('Auth')}
                 }).then(newres=>{
                     setNewReservations(newres.data);
@@ -54,5 +54,5 @@
             params: {
                 status: newStatus
-            }, headers: {Authorization: sessionStorage.getItem('Auth')}
+            }, headers: {Authorization: localStorage.getItem('Auth')}
         }).then(res => {
             getReservations()
@@ -68,5 +68,5 @@
             params: {
                 tableId: ev.target.value == '' ? 0 : ev.target.value
-            }, headers: {Authorization: sessionStorage.getItem('Auth')}
+            }, headers: {Authorization: localStorage.getItem('Auth')}
         }).then(res => {
             console.log("success");
Index: frontend/src/Dashboard/Restaurant.js
===================================================================
--- frontend/src/Dashboard/Restaurant.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/Dashboard/Restaurant.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -37,5 +37,5 @@
     const submitEdit = (form) => {
         setLoadingSave(true);
-        axios.put(env.api + 'Restaurants/',{...form}, { headers: {Authorization: sessionStorage.getItem('Auth')}
+        axios.put(env.api + 'Restaurants/',{...form}, { headers: {Authorization: localStorage.getItem('Auth')}
         }).then(res => {
             notification['success']({
Index: frontend/src/Dashboard/Review.js
===================================================================
--- frontend/src/Dashboard/Review.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/Dashboard/Review.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -1,4 +1,4 @@
 import React, {useEffect, useState} from 'react'
-import {Button, Card, Input, List, Rate, Spin, Tooltip} from "antd";
+import {Button, Card, Input, List, notification, Rate, Spin, Tooltip} from "antd";
 import axios from "axios";
 import env from "../env";
@@ -12,4 +12,5 @@
         setLoading(true);
         getRestaurant()
+        console.log(props.user)
     },[])
     useEffect(()=> {
@@ -36,5 +37,5 @@
                 {props.front ?
                     (props.user?
-                        <Button style={{float:'right'}} type={'primary'} onClick={()=>props.setVisible(true)}>Внеси оценка</Button>
+                        <Button style={{float:'right'}} type={'primary'} onClick={()=>props.user.isConfirmed ? props.setVisible(true) : notification['error']({message: <p>Мора да го потврдите вашиот мејл за да оставите оценка. <a href={'/confirm-email'}>Потврдете го тука</a></p>})}>Внеси оценка</Button>
                         : <Tooltip title={'Мора да се најавите за да оставите оценка'}><Button style={{float:'right'}} disabled type={'primary'} onClick={()=>props.setVisible(true)}>Внеси оценка</Button></Tooltip>)
                     : ''
Index: frontend/src/FrontPage.js
===================================================================
--- frontend/src/FrontPage.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/FrontPage.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -1,5 +1,5 @@
 import React, {useState, useEffect} from 'react'
 import {Header} from "./Header";
-import {useNavigate} from "react-router-dom";
+import {Link, useNavigate} from "react-router-dom";
 import {Button, Card, DatePicker, Form, Image, Input, Modal, notification, Rate, Spin} from "antd";
 import placeholderImage from '../src/Assets/placeholder.png'
@@ -26,7 +26,15 @@
     },[])
 
+    useEffect(()=>{
+        if(user && !user.isConfirmed) {
+            notification['warning']({
+                message: <p>Вашиот емаил не е потврден. <a href={'/confirm-email'}>Потврдете го тука</a></p>
+            });
+        }
+    },[user])
+
     const saveNewReview = data =>{
         setSaveModalLoading(true)
-        axios.post(env.api + 'Reviews',data,{ headers: {Authorization: sessionStorage.getItem('Auth')}}).then(res=>{
+        axios.post(env.api + 'Reviews',data,{ headers: {Authorization: localStorage.getItem('Auth')}}).then(res=>{
             setNewReviewModal(false)
             setSaveModalLoading(false)
Index: ontend/src/auth.js
===================================================================
--- frontend/src/auth.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ 	(revision )
@@ -1,178 +1,0 @@
-import React, {useState} from 'react'
-import {useNavigate} from "react-router-dom";
-import {Button, Card, Form, Input, Modal, notification} from "antd";
-import { UserOutlined, LockOutlined } from '@ant-design/icons';
-import axios from "axios";
-import './App.css'
-import env from "./env";
-
-const setAuthCookie = (token) => {
-    sessionStorage.setItem('Auth','Bearer '+token)
-}
-
-const Login = ({setUser}) => {
-    const history = useNavigate()
-
-    const [loading, setLoading] = useState(false)
-
-    const login = (attr) => {
-        setLoading(true)
-        axios.post(env.api+'Users/login',{email: attr.email, password: attr.password}).then(res => {
-            setAuthCookie(res.data.token)
-            console.log(res.data.token)
-            setUser(res.data)
-            setLoading(false)
-            history(res.data.isAdmin ? '/dashboard' : '/')
-        }).catch(el => {
-            Modal.error({
-                title: 'Погрешен мејл или лозинка',
-            });
-            setLoading(false)
-        })
-    }
-
-    return(
-        <div style={{width:'100vw',height:'100vh', textAlign:'center',backgroundColor:'#F2F2F2'}}>
-            <div className='center'>
-                <Card style={{backgroundColor:'white', width:'100%', borderRadius:'20px'}} className='center'>
-                    <h1>Најави се</h1>
-                    <Form
-                        name="normal_login"
-                        onFinish={res=>login(res)}
-                    >
-                        <Form.Item
-                            name="email"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: 'Внесете мејл',
-                                },
-                                {
-                                    type: 'email',
-                                    message: 'Внесете валиден мејл',
-                                },
-                            ]}
-                        >
-                            <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="Email" />
-                        </Form.Item>
-                        <Form.Item
-                            name="password"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: 'Внесете лозинка!',
-                                }
-                            ]}
-                        >
-                            <Input
-                                prefix={<LockOutlined className="site-form-item-icon" />}
-                                type="password"
-                                placeholder="Password"
-                            />
-                        </Form.Item>
-
-                        <Form.Item style={{margin:'0px'}}>
-                            <Button type="primary" htmlType="submit" className="login-form-button" loading={loading}>
-                                Log in
-                            </Button>
-                            <div>
-                                Или <a href={"/register"}>регистрирај се!</a>
-                            </div>
-                        </Form.Item>
-                    </Form>
-                </Card>
-            </div>
-        </div>
-    )
-}
-
-const Register = ({setUser}) => {
-
-    const [loading, setLoading] = useState(false)
-    const history = useNavigate()
-    const register = (attr) => {
-        if (attr.password !== attr.confirm) {
-            Modal.error({
-                title: 'Лозинките не се исти',
-            });
-            return;
-        }
-        setLoading(true)
-        axios.post(env.api+'Users/register',{email: attr.email, password: attr.password}).then(res => {
-            setAuthCookie(res.data.token)
-            setUser(res.data)
-            setLoading(false)
-            history(res.data.isAdmin ? '/dashboard' : '/')
-        })
-    }
-    return(
-        <div style={{width:'100vw',height:'100vh', textAlign:'center', backgroundColor:'#F2F2F2'}}>
-            <div className='center'>
-                <Card style={{backgroundColor:'white', width:'100%', borderRadius:'20px'}} className='center'>
-                    <h1>Регистрирај се</h1>
-                    <Form
-                        name="normal_login"
-                        onFinish={(attr)=>register(attr)}
-                    >
-                        <Form.Item
-                            name="email"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: 'Внесете мејл',
-                                },
-                                {
-                                    type: 'email',
-                                    message: 'Внесете валиден мејл',
-                                },
-                            ]}
-                        >
-                            <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="Email" />
-                        </Form.Item>
-                        <Form.Item
-                            name="password"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: 'Внесете лозинка!',
-                                },
-                            ]}
-                        >
-                            <Input
-                                prefix={<LockOutlined className="site-form-item-icon" />}
-                                type="password"
-                                placeholder="Password"
-                            />
-                        </Form.Item>
-                        <Form.Item
-                            name="confirm"
-                            rules={[
-                                {
-                                    required: true,
-                                    message: 'Потврдете лозинка!',
-                                },
-                            ]}
-                        >
-                            <Input
-                                prefix={<LockOutlined className="site-form-item-icon" />}
-                                type="password"
-                                placeholder="Confirm password"
-                            />
-                        </Form.Item>
-
-                        <Form.Item style={{margin:'0px'}}>
-                            <Button type="primary" htmlType="submit" className="login-form-button" loading={loading}>
-                                Register
-                            </Button>
-                            <div>
-                                Или <a href={"/login"}>најави се!</a>
-                            </div>
-                        </Form.Item>
-                    </Form>
-                </Card>
-            </div>
-        </div>
-    )
-}
-
-export {Login,Register};
Index: frontend/src/index.js
===================================================================
--- frontend/src/index.js	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ frontend/src/index.js	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -6,6 +6,4 @@
 const root = ReactDOM.createRoot(document.getElementById('root'));
 root.render(
-  <React.StrictMode>
     <App />
-  </React.StrictMode>
 );
Index: resTools_backend/backend/Controllers/UsersController.cs
===================================================================
--- resTools_backend/backend/Controllers/UsersController.cs	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ resTools_backend/backend/Controllers/UsersController.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -41,5 +41,43 @@
         }catch (Exception ex){ return null; }
         User user = await _userService.GetById(userId);
-        return new AuthenticateResponse() { Email=user.Email, Id = user.Id};
+        return new AuthenticateResponse() { Email=user.Email, Id = user.Id, IsAdmin = user.IsAdmin, IsConfirmed = user.IsConfirmed};
+    }
+
+    [HttpPost("confirm")]
+    public async Task ConfirmEmail()
+    {
+        int userId = 0;
+        try
+        {
+            userId = (int)this.HttpContext.Items["User"];
+        }
+        catch (Exception ex) { return; }
+        User user = await _userService.GetById(userId);
+        await _userService.SendEmailConfirmation(user.Email);
+    }
+
+    [HttpPost("reset")]
+    public async Task ResetPassword(string email)
+    {
+        await _userService.SendPasswordReset(email);
+    }
+
+    [HttpPost("confirmed")]
+    public async Task ConfirmedEmail(string validityString)
+    {
+        int userId = 0;
+        try
+        {
+            userId = (int)this.HttpContext.Items["User"];
+        }
+        catch (Exception ex) { return; }
+        User user = await _userService.GetById(userId);
+        await _userService.ConfirmEmail(user, validityString);
+    }
+
+    [HttpPost("reseted")]
+    public async Task ResetedPassword(string validityString, string newPassword)
+    {
+        await _userService.ResetPassword(validityString, newPassword);
     }
 
Index: resTools_backend/backend/DTOs/AuthenticateResponse.cs
===================================================================
--- resTools_backend/backend/DTOs/AuthenticateResponse.cs	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ resTools_backend/backend/DTOs/AuthenticateResponse.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -15,3 +15,5 @@
     [JsonProperty]
     public bool IsAdmin { get; set; }
+    [JsonProperty]
+    public bool IsConfirmed { get; set; }
 }
Index: resTools_backend/backend/Email/EmailSender.cs
===================================================================
--- resTools_backend/backend/Email/EmailSender.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ resTools_backend/backend/Email/EmailSender.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,25 @@
+﻿using SendGrid;
+using SendGrid.Helpers.Mail;
+
+namespace backend.Email;
+public interface IEmailSender
+{
+    Task SendEmailAsync(string subject, string body, string toEmail);
+}
+public class EmailSender : IEmailSender
+{
+    public async Task SendEmailAsync(string subject, string message, string toEmail)
+    {
+        var client = new SendGridClient("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");
+        var msg = new SendGridMessage()
+        {
+            From = new EmailAddress("danilo.najkov@students.finki.ukim.mk", "Danilo"),
+            Subject = subject,
+            PlainTextContent = message,
+            HtmlContent = message
+        };
+        msg.AddTo(new EmailAddress(toEmail));
+        msg.SetClickTracking(false, false);
+        var response = await client.SendEmailAsync(msg);
+    }
+}
Index: resTools_backend/backend/Entities/User.cs
===================================================================
--- resTools_backend/backend/Entities/User.cs	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ resTools_backend/backend/Entities/User.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -9,4 +9,9 @@
     public string Password { get; set; }
     public bool IsAdmin { get; set; }
+    public bool IsConfirmed { get; set; }
+    public string? ConfirmationURL { get; set; }
+    public DateTime? ConfirmationValidTo { get; set; }
+    public string? PasswordResetURL { get; set; }
+    public DateTime? PasswordResetValidTo { get; set; }
     public virtual Restaurant Restaurant { get; set; }
 }
Index: resTools_backend/backend/Migrations/20220808143343_Auth-changes.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220808143343_Auth-changes.Designer.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ resTools_backend/backend/Migrations/20220808143343_Auth-changes.Designer.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,280 @@
+﻿// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using backend.Data;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    [DbContext(typeof(DataContext))]
+    [Migration("20220808143343_Auth-changes")]
+    partial class Authchanges
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "6.0.3")
+                .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+            modelBuilder.Entity("backend.Entities.MenuItem", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Description")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Price")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Title")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("MenuItems");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ContactName")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("ContactNumber")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Persons")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationPlace")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationStatus")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationType")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<DateTime>("StartDate")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.Property<int>("Table")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Address")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<byte[]>("Image")
+                        .IsRequired()
+                        .HasColumnType("bytea");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Phone")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("OwnerFk")
+                        .IsUnique();
+
+                    b.ToTable("Restoraunts");
+                });
+
+            modelBuilder.Entity("backend.Entities.Review", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<DateTime>("CreatedAt")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.Property<string>("Description")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("Stars")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Title")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("UserId")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("Reviews");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ConfirmationURL")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<DateTime>("ConfirmationValidTo")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.Property<string>("Email")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<bool>("IsAdmin")
+                        .HasColumnType("boolean");
+
+                    b.Property<bool>("IsConfirmed")
+                        .HasColumnType("boolean");
+
+                    b.Property<string>("Password")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("PasswordResetURL")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<DateTime>("PasswordResetValidTo")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Users");
+                });
+
+            modelBuilder.Entity("backend.Entities.MenuItem", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Menu")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reservations")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.HasOne("backend.Entities.User", "Owner")
+                        .WithOne("Restaurant")
+                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
+
+                    b.Navigation("Owner");
+                });
+
+            modelBuilder.Entity("backend.Entities.Review", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reviews")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("backend.Entities.User", "User")
+                        .WithMany()
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Navigation("Menu");
+
+                    b.Navigation("Reservations");
+
+                    b.Navigation("Reviews");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Navigation("Restaurant")
+                        .IsRequired();
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220808143343_Auth-changes.cs
===================================================================
--- resTools_backend/backend/Migrations/20220808143343_Auth-changes.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ resTools_backend/backend/Migrations/20220808143343_Auth-changes.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,71 @@
+﻿using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class Authchanges : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<string>(
+                name: "ConfirmationURL",
+                table: "Users",
+                type: "text",
+                nullable: false,
+                defaultValue: "");
+
+            migrationBuilder.AddColumn<DateTime>(
+                name: "ConfirmationValidTo",
+                table: "Users",
+                type: "timestamp with time zone",
+                nullable: false,
+                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
+
+            migrationBuilder.AddColumn<bool>(
+                name: "IsConfirmed",
+                table: "Users",
+                type: "boolean",
+                nullable: false,
+                defaultValue: false);
+
+            migrationBuilder.AddColumn<string>(
+                name: "PasswordResetURL",
+                table: "Users",
+                type: "text",
+                nullable: false,
+                defaultValue: "");
+
+            migrationBuilder.AddColumn<DateTime>(
+                name: "PasswordResetValidTo",
+                table: "Users",
+                type: "timestamp with time zone",
+                nullable: false,
+                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "ConfirmationURL",
+                table: "Users");
+
+            migrationBuilder.DropColumn(
+                name: "ConfirmationValidTo",
+                table: "Users");
+
+            migrationBuilder.DropColumn(
+                name: "IsConfirmed",
+                table: "Users");
+
+            migrationBuilder.DropColumn(
+                name: "PasswordResetURL",
+                table: "Users");
+
+            migrationBuilder.DropColumn(
+                name: "PasswordResetValidTo",
+                table: "Users");
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.Designer.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.Designer.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,278 @@
+﻿// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using backend.Data;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    [DbContext(typeof(DataContext))]
+    [Migration("20220808143757_Auth-changes-nullable")]
+    partial class Authchangesnullable
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "6.0.3")
+                .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+            modelBuilder.Entity("backend.Entities.MenuItem", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Description")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Price")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Title")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("MenuItems");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ContactName")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("ContactNumber")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Persons")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationPlace")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationStatus")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationType")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<DateTime>("StartDate")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.Property<int>("Table")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Address")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<byte[]>("Image")
+                        .IsRequired()
+                        .HasColumnType("bytea");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Phone")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("OwnerFk")
+                        .IsUnique();
+
+                    b.ToTable("Restoraunts");
+                });
+
+            modelBuilder.Entity("backend.Entities.Review", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<DateTime>("CreatedAt")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.Property<string>("Description")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("Stars")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Title")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("UserId")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("Reviews");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ConfirmationURL")
+                        .HasColumnType("text");
+
+                    b.Property<DateTime?>("ConfirmationValidTo")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.Property<string>("Email")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<bool>("IsAdmin")
+                        .HasColumnType("boolean");
+
+                    b.Property<bool>("IsConfirmed")
+                        .HasColumnType("boolean");
+
+                    b.Property<string>("Password")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("PasswordResetURL")
+                        .HasColumnType("text");
+
+                    b.Property<DateTime?>("PasswordResetValidTo")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Users");
+                });
+
+            modelBuilder.Entity("backend.Entities.MenuItem", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Menu")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reservations")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.HasOne("backend.Entities.User", "Owner")
+                        .WithOne("Restaurant")
+                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
+
+                    b.Navigation("Owner");
+                });
+
+            modelBuilder.Entity("backend.Entities.Review", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reviews")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("backend.Entities.User", "User")
+                        .WithMany()
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Navigation("Menu");
+
+                    b.Navigation("Reservations");
+
+                    b.Navigation("Reviews");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Navigation("Restaurant")
+                        .IsRequired();
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.cs
===================================================================
--- resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
+++ resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -0,0 +1,88 @@
+﻿using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class Authchangesnullable : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AlterColumn<DateTime>(
+                name: "PasswordResetValidTo",
+                table: "Users",
+                type: "timestamp with time zone",
+                nullable: true,
+                oldClrType: typeof(DateTime),
+                oldType: "timestamp with time zone");
+
+            migrationBuilder.AlterColumn<string>(
+                name: "PasswordResetURL",
+                table: "Users",
+                type: "text",
+                nullable: true,
+                oldClrType: typeof(string),
+                oldType: "text");
+
+            migrationBuilder.AlterColumn<DateTime>(
+                name: "ConfirmationValidTo",
+                table: "Users",
+                type: "timestamp with time zone",
+                nullable: true,
+                oldClrType: typeof(DateTime),
+                oldType: "timestamp with time zone");
+
+            migrationBuilder.AlterColumn<string>(
+                name: "ConfirmationURL",
+                table: "Users",
+                type: "text",
+                nullable: true,
+                oldClrType: typeof(string),
+                oldType: "text");
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AlterColumn<DateTime>(
+                name: "PasswordResetValidTo",
+                table: "Users",
+                type: "timestamp with time zone",
+                nullable: false,
+                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
+                oldClrType: typeof(DateTime),
+                oldType: "timestamp with time zone",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<string>(
+                name: "PasswordResetURL",
+                table: "Users",
+                type: "text",
+                nullable: false,
+                defaultValue: "",
+                oldClrType: typeof(string),
+                oldType: "text",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<DateTime>(
+                name: "ConfirmationValidTo",
+                table: "Users",
+                type: "timestamp with time zone",
+                nullable: false,
+                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
+                oldClrType: typeof(DateTime),
+                oldType: "timestamp with time zone",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<string>(
+                name: "ConfirmationURL",
+                table: "Users",
+                type: "text",
+                nullable: false,
+                defaultValue: "",
+                oldClrType: typeof(string),
+                oldType: "text",
+                oldNullable: true);
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/DataContextModelSnapshot.cs
===================================================================
--- resTools_backend/backend/Migrations/DataContextModelSnapshot.cs	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ resTools_backend/backend/Migrations/DataContextModelSnapshot.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -176,4 +176,10 @@
                     NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 
+                    b.Property<string>("ConfirmationURL")
+                        .HasColumnType("text");
+
+                    b.Property<DateTime?>("ConfirmationValidTo")
+                        .HasColumnType("timestamp with time zone");
+
                     b.Property<string>("Email")
                         .IsRequired()
@@ -183,7 +189,16 @@
                         .HasColumnType("boolean");
 
+                    b.Property<bool>("IsConfirmed")
+                        .HasColumnType("boolean");
+
                     b.Property<string>("Password")
                         .IsRequired()
                         .HasColumnType("text");
+
+                    b.Property<string>("PasswordResetURL")
+                        .HasColumnType("text");
+
+                    b.Property<DateTime?>("PasswordResetValidTo")
+                        .HasColumnType("timestamp with time zone");
 
                     b.HasKey("Id");
Index: resTools_backend/backend/Program.cs
===================================================================
--- resTools_backend/backend/Program.cs	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ resTools_backend/backend/Program.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -1,3 +1,4 @@
 using backend.Data;
+using backend.Email;
 using backend.Helpers;
 using backend.Services;
@@ -50,4 +51,6 @@
 builder.Services.AddScoped<ISmsService, SmsService>();
 
+builder.Services.AddTransient<IEmailSender, EmailSender>();
+
 builder.Services.AddDbContext<DataContext>(p => p.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
 
Index: resTools_backend/backend/Services/UserService.cs
===================================================================
--- resTools_backend/backend/Services/UserService.cs	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ resTools_backend/backend/Services/UserService.cs	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -1,6 +1,7 @@
-namespace backend.Services;
+﻿namespace backend.Services;
 
 using backend.Data;
 using backend.DTOs;
+using backend.Email;
 using backend.Entities;
 using backend.Helpers;
@@ -11,4 +12,6 @@
 using System.IdentityModel.Tokens.Jwt;
 using System.Security.Claims;
+using System.Security.Cryptography;
+using System.Text;
 
 public interface IUserService
@@ -17,4 +20,8 @@
     Task<AuthenticateResponse> Register(CreateUserRequest req, bool isFirst);
     Task<User> GetById(int id);
+    Task SendEmailConfirmation(string email);
+    Task SendPasswordReset(string email);
+    Task ConfirmEmail(User user, string checkValid);
+    Task ResetPassword(string checkValid, string password);
 }
 
@@ -23,9 +30,11 @@
     private readonly AppSettings _appSettings;
     private readonly DataContext _context = null;
+    private readonly IEmailSender _emailSender;
 
-    public UserService(IOptions<AppSettings> appSettings, DataContext context)
+    public UserService(IOptions<AppSettings> appSettings, DataContext context, IEmailSender emailSender)
     {
         _appSettings = appSettings.Value;
         _context = context;
+        _emailSender = emailSender;
     }
 
@@ -40,5 +49,21 @@
         var token = generateJwtToken(user);
 
-        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token, IsAdmin = user.IsAdmin};
+        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token, IsAdmin = user.IsAdmin, IsConfirmed = user.IsConfirmed};
+    }
+
+    public async Task ConfirmEmail(User user, string checkValid)
+    {
+        if(user.ConfirmationURL != checkValid)
+        {
+            throw new Exception("Invalid check");
+        }
+        if(user.ConfirmationValidTo < DateTime.UtcNow)
+        {
+            throw new Exception("Link expired");
+        }
+
+        user.IsConfirmed = true;
+        _context.Users.Update(user);
+        await _context.SaveChangesAsync();
     }
 
@@ -50,9 +75,52 @@
     public async Task<AuthenticateResponse> Register(CreateUserRequest req, bool isFirst)
     {
-        User user = new User() { Email = req.Email, Password = req.Password, IsAdmin = isFirst };
+        User user = new User() { Email = req.Email, Password = req.Password, IsAdmin = isFirst, IsConfirmed = false };
         await _context.Users.AddAsync(user);
         await _context.SaveChangesAsync();
         var token = generateJwtToken(user);
-        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token, IsAdmin = user.IsAdmin };
+        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token, IsAdmin = user.IsAdmin, IsConfirmed = false };
+    }
+
+    public async Task ResetPassword(string checkValid, string password)
+    {
+        var user = await _context.Users.Where(x => x.PasswordResetURL == checkValid).FirstOrDefaultAsync();
+        if (user == null)
+        {
+            throw new Exception("Invalid check");
+        }
+        if (user.PasswordResetValidTo < DateTime.UtcNow)
+        {
+            throw new Exception("Link expired");
+        }
+
+        user.Password = password;
+        _context.Users.Update(user);
+        await _context.SaveChangesAsync();
+    }
+
+    public async Task SendEmailConfirmation(string email)
+    {
+        User user = await _context.Users.FirstOrDefaultAsync(x => x.Email == email);
+        user.ConfirmationURL = Guid.NewGuid().ToString();
+        user.ConfirmationValidTo = DateTime.UtcNow.AddHours(24);
+        _context.Users.Update(user);
+        await _context.SaveChangesAsync();
+        await _emailSender.SendEmailAsync(
+            "Потврдете го вашиот емаил",
+            "Ве молиме кликнете на следниот линк за да го потврдите вашиот емаил: http://localhost:3000/confirm?id=" + user.ConfirmationURL,
+            email);
+    }
+
+    public async Task SendPasswordReset(string email)
+    {
+        User user = await _context.Users.FirstOrDefaultAsync(x => x.Email == email);
+        user.PasswordResetURL = Guid.NewGuid().ToString();
+        user.PasswordResetValidTo = DateTime.UtcNow.AddHours(24);
+        _context.Users.Update(user);
+        await _context.SaveChangesAsync();
+        await _emailSender.SendEmailAsync(
+           "Ресетирајте ја лозинката",
+           "Ве молиме кликнете на следниот линк за да ја ресетирате лозинката: http://localhost:3000/reset?id=" + user.PasswordResetURL,
+           email);
     }
 
@@ -71,3 +139,13 @@
         return tokenHandler.WriteToken(token);
     }
+    
+    private string sha256Hash(String value)
+    {
+        using (SHA256 hash = SHA256.Create())
+        {
+            return String.Concat(hash
+              .ComputeHash(Encoding.UTF8.GetBytes(value))
+              .Select(item => item.ToString("x2")));
+        }
+    }
 }
Index: resTools_backend/backend/backend.csproj
===================================================================
--- resTools_backend/backend/backend.csproj	(revision 899b19da4d7326788e23e45dd1881ec1395e1d88)
+++ resTools_backend/backend/backend.csproj	(revision a26f6a1dc0314af7fc65fdabb78f1acbaca506a0)
@@ -1,3 +1,3 @@
-<Project Sdk="Microsoft.NET.Sdk.Web">
+﻿<Project Sdk="Microsoft.NET.Sdk.Web">
 
   <PropertyGroup>
@@ -22,4 +22,5 @@
     <PackageReference Include="Npgsql" Version="6.0.3" />
     <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.3" />
+    <PackageReference Include="SendGrid" Version="9.28.0" />
     <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
     <PackageReference Include="Swashbuckle.Core" Version="5.6.0" />
