Cherry pick change from develop to add default permissions for admin access after successful login.

Addresses #355 and #614.

Notes:
- Fixed issue with salt not being applied during add (if the salt was on the id field).
- Fixed issue with salt being applied twice in some cases.
- Password is not required but if left blank on add it will generate a random password.   If using a salt, no user will be able to login with this password.
- If password is left blank on the update admin then the password field will be ignored.