Fixed bug when logged in