Merge pull request #535 from bhariharan/unstable

Passcode bugfix
Using community URL for all requests if available
Bugfix for push unregister call.
Adding tests for community URL parsing
Set the correct return URL for communities as well
Merge pull request #536 from bhariharan/community_url

Using community URL for all requests if available
Make default communityId 18-char long