For cake1.3
In your controller
$id = $this->User->createUser($this->data);
$this->data['User'] = array_merge($this->data['User'], array('id' => $id));
$this->Auth->login($this->data);
$this->redirect('home');
Model
before creating user you've to hash the user entered password and then save into the database
function createUser($data){
$data['User']['password'] = md5($data['User']['password']);
$this->save();
return $this->id; // return id of last saved record
}