Hi Gonçalo,
I think it is easier to just use the User_Login action from Users:

You can just pass the username and password (as the user writes it) and you don't need to worry with the hashing to match the one encrypted in the database because it is handled inside that action.
Hope it helps.
Regards,
João