Revision based on pull request comments and such:
Reverted lib changes;
Refactored resourceName in payload data to httpConfig();
Corrected return value of resourceName();
Added unit tests for resourceName configuration and .login, .register actions under various resourceName scenarios.