def sign_in(authenticatable)
      key = cookie_name(authenticatable.class)
      cookies.encrypted.permanent[key] = {value: authenticatable.id}
      authenticatable
    end
def sign_in(authenticatable)
      key = cookie_name(authenticatable.class)
      cookies.encrypted.permanent[key] = {value: authenticatable.id}
      authenticatable
    end
Signs in user by assigning their id to a permanent cookie.
 @param authenticatable [ActiveRecord::Base] Instance of Model to sign in
   (e.g - @user when @user = User.find(id: some_id)).
 @return [ActiveRecord::Base] the record that is passed in.