bugfix: check if login config was created before using it

* inform the user if the file was not created
* adjust file attributes if it was created successfully

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>