Now detects if running as a console application
Instead of storing the token in application, request it from the URI instead