Implemented reset password functionality
Made sure password resets force a password change

newpassword has to be set to a non-zero value to force the user to
change their password on login.

Addtionally some code styling fixes were made.
Merge remote-tracking branch 'origin/duggasys-master' into duggasys-Quiz