Added InvalidPasswordException. Made command() return output message.