added method authenticate
added method authenticate