fix the problem for normal log
add the login check