added setPasswordMode()

fixed a bug that caused crash on exit on mac+glfw
added setPasswordMode()