Use a stdClass to pass the username password around instead of straight function parameters to help hide it in stack dumps.
Make the exception handler give user friendly message instead of stack dump.