Hello, I am wondering how to properly do an ajax login. I will be doing the whole thing with jquery ajax. I use it for a lot of stuff, I hav ajax controller that handles getting data from models and returns jsons. It works just fine...
Yet when it comes to login, the whole auth seems to me to be too closely coupled with view. What I would like to have is function in my ajax controller. Named login it would take from request.vars.login, request.vars.password. Then I would just fire up auth.login(request.vars.login, request.vars.password) and I am logged. Do I have to go all the way to getting a user from database, hashing a password, and checking if its ok, than manually adding session.vars?

