modify auth logic