           @loginAssertion(browser)
 
 
-  loginAssertion: (browser) ->
+  loginAssertion: (browser, callback) ->
 
     user = utils.getUser()
 
     browser
-      .waitForElementVisible  '[testpath=main-sidebar]', 20000 # Assertion
+      .waitForElementVisible  '[testpath=main-sidebar]', 20000, yes, callback # Assertion
 
     console.log " ✔ Successfully logged in with username: #{user.username} and password: #{user.password} to team: #{helpers.getUrl(yes)}"
 
 
-  loginToTeam: (browser, user, invalidCredentials = no) ->
+  loginToTeam: (browser, user, invalidCredentials = no, callback = -> ) ->
 
     incorrectEmailAddress = 'a@b.com'
     incorrectUserName     = 'testUserName'

      .click                 joinButton

    if assertLoggedIn
      @loginAssertion(browser)


  getInvitationUrl: (browser, email, callback) ->

      .waitForElementVisible modalSelector, 20000
      .click                 '.TeamsModal-button-link a'
      .pause                 2000
      .waitForElementVisible modalSelector, 20000
      .pause                 2000
      .click                 '.TeamsModal-button-link a'
      .pause                 2000
