Fiddled around with blocking sockets and decided to only use them on the server side. They didn't really make sense for the client. Then I fixed the bitbucket oauth with oauth2 instead of rauth.