Logging in without leaving the page

Lets say you have a blog and users need to log in before leaving a comment.
( This is simplified. There are reasons log in is required here. )

I would like to have a link that says “log in to comment”.
Upon clicking it, a pop up layer comes up.
After logging in, the comment box appears

I would like this to all be silky smooth and seamless.

Can someone outline the method you would use using jQuery to do this?

Michael

Personally unless you use an SSL connection when sending user information via jQuery don’t bother and use normal authentication

I’ve been working on this, though using prototype. The JavaScript portion is relatively easy - its the server side code that’s going to be the pain.

What are the Javascript steps? I’m not too worried about the backside steps.

That’s the thing, without the server side code that’s being used set up it’s impossible to determine what the js will need to be. It’s like trying to build the walls of a house before the foundation is poured.

The server side code for logging in should be fairly simple.
If the user name and md5(password) match against the database it writes a session for the user
Are there other factors I’m not thinking of?

Thanks
E