'How can I give a button more than one location?

I have this button for logging in to my website that is linked to a function in my javascript. But how can I also set the location to direct to another html page after logging in?

<div id="button_container">
          <button onclick="login()">Login</button>
        </div>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source