Changes for Authentication. 

https://github.com/InMobi/hive/pull/32
Same as above- casting would be required in jdk6