Stylistic revision of docstrings

Cleaned up grammar, whitespace, missing return values in docstrings, and
Pylint-satisfying cleanup.
Code refactor for function login()

Move some code in login() to their respective functions when possible.
Do not reinstall old umask after becoming daemon.

The old umask is no longer used for the creation of filesystem objects.
Instead, we explicitly fchmod() on the fd.