I would start by looking at the showLogin action on Discourse.ApplicationRoute – for Hummingbird I have the following in a plugin:
Discourse.ApplicationRoute.reopen({
actions: {
showLogin: function() {
window.location = "http://hummingbird.me/users/sign_in";
}
}
});