You didn't answer the question. Why can't you simply invoke the same code that opens the chatroom (manually) as part of the startup code on the home page?
And if the problem is that you need to do that only when a given person (you?) is logged in, then you will have to use AJAX to solve it.
But so far, we don't even know if your Chat code is JS-based or is something else entirely. If you want help, you have to show details, which probably implies showing code.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.