in reply to How do I end a while loop early?
Oops. You already did.
Update: Are you sure your logic is correct? Does the authorization really happen while generating the page?