flash errors for duplicate emails adds in database and for wrong password matching