added logincheck