Note: While this sample uses local accounts I urge you to consider using an oauth provider/Azure AD as the user store for a real project. It is much more secure than managing username/password ...