Revisited `login`.
Created by: goyox86
- Added constants for standard file paths.
- Improved error reporting when opening the files.
- Improved error reporting when parsing the files.
- Used
Passwd::parse_file
instead of doing it manually. - Removed all the calls to unwrap() by using
try()
. - Used
fail
to report errors and exit when possible.