You need to set your $config['base_url'] in application\config\config.php.
Now it's trying to guess your url and returning ipv6 localhost address instead.
You need to be logged in, there are two redirect('home') in that file you posted.
_remap points to the private login() function. So you must have a form that triggers the _remap function with login passed as argument. Look for a url: _remap/login/
For finding out the encryption of the password, you will need to look at the admin module:
$this->admin->login($username, $password);
And reset it in the database.