finished basic authentication with ajax logout