set LoginCheck and Cookie Write (Read is next commit)