Marginal productivity of aggregate labor relation to wage
So the firm's problem is, letting $L=Nl$

$\max_{L} Y-Lw\implies w=(1-\alpha)AL^{-\alpha}, \pi(w)=\alpha AL^{1-\alpha}$

Consumer's problem: substitute out c and only choose l, taking $\pi$ and $w$ as given

$\max_l u(l, wl+1/(N\pi))\implies -\gamma/(1-l)+w/(wl+1/(N\pi))=0$

Now substitute in the values for w and profit from the firm into the consumer's FOC and you will solve for labor supply (=labor demand as we are in eq) in terms of exogenous parameters ($\gamma, N,\alpha, A)$.