Added login and logout tasks to save access tokens.