Fix undefined method authentications for nil:NilClass