Fix redirect and login, and remove put file.