Error when type sway

This the error:

00:00:00.003 [wir] [libseat]l [libseat/backend/logind.c:317]1 Could not activate session: Permission denied
00:00:00.003 [wir] [libseat] [libseat/libseat.c:?9]1 No backend was able to open a seat

00:00:00.004 [wir] [backend /session/session.c:83] Unable to create seat: Function not inplenented
00:00:00.005 [wir] [backend/session/session.c:248]1 Failed to load session backend

00:00:00.006 [wir] [backend/backend.c:86] Failed to start a session

00:00:00.007 [wir] [backend /backend.c:357]1 Failed to start a DRM session

00:00:00.008 [ .c:73]1 Unable to create backend

How did you install sway and does it work if you use a DM instead?