img limit resize and logout redirect page edited