Fixed unit test
Update login, added email configuraton and flash message