fixes login/redirect issues