rename url for creating a short url
added test for invalid account
added try/finally blocks to connections to the db