Moved the pwd update to after the site update

Because if code and db are out of sync this causes an issue

Resolves #11