I have a webpage that makes the login to an external service, so, depending on the result, I log in the user or I do not.
I followed this tutorial for it and it works