That's the only way or you could build a PHP script which would be the most secure with your details. Then all you need to do is head to that file and it will re-direct you already logged in.
You could also have a form pre-filled out and use javascript to submit the information upon you loading the page. Therefore, it would also send the data and redirect you.