implemented device auth flow