Both URLs you provided are not correctly formatted. Your 1st link, you have a quote mark before "username", that should be removed. Alternatively, your 2nd link is missing the quote mark after the ".com".
Your issue could be because your links were not properly formatted, and therefore didn't recognize the organization you were a part of. Which is why it kept asking you to login.
For more details, please see the Microsoft Teams Deep Linking Page.