Bug 1086 fixed. Updated authentication mechanism