fixed some issues
wait for ajax call to finish and redirect afterwards
fixed everything - working like a charm!
small fixes