Updated the check for already logged in mechanism, saving unnecessary extra queries when calling validate_session() function.