Adds flash for invalid login
Adds token generation to RegisteredUser