Allow entering password on preview

Also refactored preview login code a bit. fixes #1596
Enable update button when post password changes