Added tests for changing user passwords and fixed a bug in that functionality