added example view codes. Implemented controller-side password encryption

controller-side password encryption might need to be copied and pasted
or set to its own function.