fixing undefined method 'authenticate'