added User authenticate method and added also test for this