Fix login, add a User::persist() method, finish authentication types