added checking headers for authentication