I agree, always take the prescribe amount (unless you become allergic then call your doctor or go to the ER). If you don't take the whole dose as prescribed you can develop resistant bacteria in the future.
You should finish the full course of antibiotics that were given to you and then go back and have your urine tested again to make sure the infection is gone.