rules() rules() Declares the validation rules. The rules state that username and password are required, and password needs to be authenticated.
authenticate() authenticate( $attribute, $params) Authenticates the password. This is the 'authenticate' validator as declared in rules(). Parameters $attribute $params
login() login() : boolean Logs in the user using the given username and password in the model. Returns boolean — whether login is successful