Added authenticate method. Method returns token. Added test for method.