Added HP authentication support, code reformat according to Hadoop code style