changed log page and repaired loggin to database