Although it's not written in PHP, you should look at GateOne.
It's essentially a web-based SSH client, with all the features you need such as session resume, multiple sessions, key storage, favorites, etc.
There's no automatic login to the localhost, if you wanted to access it you'd need to...