public ActionResult Login(AccountLogin accountLogin)
        {
            if (accountLogin == null || accountLogin.Email == null || accountLogin.Password == null)
            {
                return(View(accountLogin));
            }

            var account = databaseHandler.AccountRepository.GetAccountByEmail(accountLogin.Email);

            if (account != null)
            {
                if (string.Compare(accountLogin.Password, account.Password) == 0)
                {
                    if (!account.IsEmailVerified)
                    {
                        ModelState.AddModelError("UserExists", "Please verify your account by checking your emails");
                        return(View(accountLogin));
                    }

                    //Cookie hinzufügen
                    int    timeout   = accountLogin.RememberMe ? 525600 : 20;
                    var    ticket    = new FormsAuthenticationTicket(accountLogin.Email, accountLogin.RememberMe, timeout);
                    string encrypted = FormsAuthentication.Encrypt(ticket);
                    var    cookie    = new HttpCookie(FormsAuthentication.FormsCookieName, encrypted);
                    cookie.Expires  = DateTime.Now.AddMinutes(timeout);
                    cookie.HttpOnly = true;
                    Response.Cookies.Add(cookie);
                    authentificationManager.SignIn(account);

                    ViewBag.Status  = true;
                    ViewBag.Message = "Login successfully";
                    NotificationCenter.AddLoginNotification("Welcome " + account.Fullname);
                }

                else
                {
                    ViewBag.Status = false;
                    ModelState.AddModelError("UserExists", "Either your email or your password is wrong, try again!");
                }
            }
            else
            {
                ViewBag.Status = false;
                ModelState.AddModelError("UserExists", "Either your email or your password is wrong, try again!");
            }

            return(View(accountLogin));
        }