I need to do hook despues of login. With this hook I need to obtain the groups and permissions of the connected user, and then pass some session to a homemade application in function of its permissions. How can i make it?