added db interaction for withdraw + jquery bugfixes