added possibility to auth with token