adding authenticate user method