Fix runtime error in `login` action when name or pass is empty