Codex tools: Log in
Validates authentication cookie.
The checks include making sure that the authentication cookie is set and pulling in the contents (if $cookie is not used). Makes sure the cookie is not expired. Verifies the hash in cookie is what is should be and compares the two.
wp_validate_auth_cookie() is located in