Fix issue with invalid repo user for api call to bitbucket.

take a look at issue #502 for details