Move authentication in listener