fix start & end loginc