in ebook alot of things are missing, thats what is called incomplete tutorials with errors…
login to User model not working , i did same and repeated exactly same, this encrtion is also not working
i am using this and working fine in USER MODEL
//this function encrypts password to md5 encryption
public function beforeSave()
{
$pass = md5($this->password);
$this->password = $pass;
return true;
}