Updated the login process to use team membership