Fix #4304 - Blank password is tried when it shouldn't happen

Fix #4304
Fix #4307 - Check action for nil

Auxiiary modules already do this, but looks like we forgot to do the
same for post modules.

I also changed the error to allow "reason" in order to be more
informative about what the user should do.

Fix #4307
Remove junk code
Land #4319, @wchen-r7's fix for #4307
Land #4313, @wchen-r7's fix for #4304